Hello community,
here is the log from the commit of package yast2-storage
checked in at Thu Sep 28 20:46:56 CEST 2006.
--------
--- yast2-storage/yast2-storage.changes 2006-09-21 19:11:49.000000000 +0200
+++ /mounts/work_src_done/STABLE/yast2-storage/yast2-storage.changes 2006-09-28 16:42:00.000000000 +0200
@@ -1,0 +2,18 @@
+Thu Sep 28 16:40:05 CEST 2006 - fehr@suse.de
+
+- add more general fix for bug #202346
+- version 2.14.7
+
+-------------------------------------------------------------------
+Tue Sep 26 19:05:21 CEST 2006 - fehr@suse.de
+
+- fix bug handling resize of partitions with inconsistent windows
+ fs (#207878)
+
+-------------------------------------------------------------------
+Mon Sep 25 12:37:03 CEST 2006 - fehr@suse.de
+
+- add also driver module ot INITRDMODULES (#206432)
+- fix crash while detetcting dmraid devices (#207410)
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.14.6.tar.bz2
New:
----
yast2-storage-2.14.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.7publD/_old 2006-09-28 20:46:25.000000000 +0200
+++ /var/tmp/diff_new_pack.7publD/_new 2006-09-28 20:46:25.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.14.6)
+# spec file for package yast2-storage (Version 2.14.7)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -11,12 +11,12 @@
# norootforbuild
Name: yast2-storage
-Version: 2.14.6
+Version: 2.14.7
Release: 1
License: GPL
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.14.6.tar.bz2
+Source0: yast2-storage-2.14.7.tar.bz2
prefix: /usr
BuildRequires: blocxx-devel docbook-xsl-stylesheets doxygen evms gcc-c++ libxcrypt-devel libxslt openssl-devel perl-XML-Writer sablot sgml-skel swig update-desktop-files yast2 yast2-core-devel yast2-devtools yast2-installation yast2-perl-bindings yast2-testsuite
Requires: yast2 parted yast2-installation yast2-storage-lib yast2-perl-bindings
@@ -40,7 +40,7 @@
%prep
-%setup -n yast2-storage-2.14.6
+%setup -n yast2-storage-2.14.7
%build
%{prefix}/bin/y2tool y2autoconf
@@ -165,6 +165,15 @@
%doc %{prefix}/share/doc/packages/yast2-storage/config.xml.description
%changelog -n yast2-storage
+* Thu Sep 28 2006 - fehr@suse.de
+- add more general fix for bug #202346
+- version 2.14.7
+* Tue Sep 26 2006 - fehr@suse.de
+- fix bug handling resize of partitions with inconsistent windows
+ fs (#207878)
+* Mon Sep 25 2006 - fehr@suse.de
+- add also driver module ot INITRDMODULES (#206432)
+- fix crash while detetcting dmraid devices (#207410)
* Thu Sep 21 2006 - fehr@suse.de
- fix problem propagating mkfs options to libstorage
- add dir_index option for ext3 formats (feature #301236)
++++++ yast2-storage-2.14.6.tar.bz2 -> yast2-storage-2.14.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/VERSION new/yast2-storage-2.14.7/VERSION
--- old/yast2-storage-2.14.6/VERSION 2006-09-21 18:52:56.000000000 +0200
+++ new/yast2-storage-2.14.7/VERSION 2006-09-28 16:41:47.000000000 +0200
@@ -1 +1 @@
-2.14.6
+2.14.7
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Dasd.cc new/yast2-storage-2.14.7/libstorage/src/Dasd.cc
--- old/yast2-storage-2.14.6/libstorage/src/Dasd.cc 2006-09-05 16:43:29.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Dasd.cc 2006-09-26 18:50:00.000000000 +0200
@@ -441,7 +441,7 @@
++i;
}
l.push_front( new commitAction( DECREASE, staticType(),
- dasdfmtText(false), true, true ));
+ dasdfmtText(false), this, true ));
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Disk.cc new/yast2-storage-2.14.7/libstorage/src/Disk.cc
--- old/yast2-storage-2.14.6/libstorage/src/Disk.cc 2006-09-14 16:08:11.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Disk.cc 2006-09-26 18:41:44.000000000 +0200
@@ -1684,7 +1684,7 @@
++i;
}
l.push_front( new commitAction( DECREASE, staticType(),
- setDiskLabelText(false), true, true ));
+ setDiskLabelText(false), this, true ));
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Dm.cc new/yast2-storage-2.14.7/libstorage/src/Dm.cc
--- old/yast2-storage-2.14.6/libstorage/src/Dm.cc 2006-09-21 18:49:43.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Dm.cc 2006-09-28 15:11:34.000000000 +0200
@@ -244,12 +244,15 @@
{
Regex r(dev);
mit = pe_map.begin();
- while( mit!=pe_map.end() && !r.match( mit->first ))
+ while( mit!=pe_map.end() && !r.match( mit->first ) &&
+ !pec()->addedPv(mit->first) )
++mit;
}
else
{
mit = pe_map.find( dev );
+ if( mit != pe_map.end() && pec()->addedPv(mit->first) )
+ mit = pe_map.end();
}
ret = mit != pe_map.end();
if( ret )
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/DmPart.cc new/yast2-storage-2.14.7/libstorage/src/DmPart.cc
--- old/yast2-storage-2.14.6/libstorage/src/DmPart.cc 2006-08-30 16:51:50.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/DmPart.cc 2006-09-26 18:53:33.000000000 +0200
@@ -102,7 +102,7 @@
{
if( s==l.size() && Partition::toChangeId( *p ) )
l.push_back( new commitAction( INCREASE, cont->staticType(),
- setTypeText(false), false ));
+ setTypeText(false), this, false ));
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/DmPartCo.cc new/yast2-storage-2.14.7/libstorage/src/DmPartCo.cc
--- old/yast2-storage-2.14.6/libstorage/src/DmPartCo.cc 2006-09-05 18:02:48.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/DmPartCo.cc 2006-09-26 18:52:20.000000000 +0200
@@ -23,7 +23,7 @@
y2debug( "constructing DmPart co %s", name.c_str() );
dev = name;
nm = undevName(name);
- num_part = pe_size = num_pe = free_pe = 0;
+ num_part = num_pe = free_pe = 0;
active = valid = del_ptable = false;
disk = NULL;
init( ppart );
@@ -237,7 +237,12 @@
{
mnr = Dm::dmNumber( nm );
ppart.getSize( "dm-"+decString(mnr), size_k );
- pe_size = size_k;
+ y2mil( "mnr:" << mnr << " nm:" << nm );
+ y2mil( "pe_size:" << pe_size << " size_k:" << size_k );
+ if( size_k>0 )
+ pe_size = size_k;
+ else
+ y2war( "size_k zero for dm minor " << mnr );
num_pe = 1;
createDisk( ppart );
if( disk->numPartitions()>0 )
@@ -703,7 +708,7 @@
string txt = deleted() ? removeText(false) :
setDiskLabelText(false);
l.push_front( new commitAction( DECREASE, staticType(),
- txt, true, true ));
+ txt, this, true ));
}
y2mil( "l:" << l );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/EvmsCo.cc new/yast2-storage-2.14.7/libstorage/src/EvmsCo.cc
--- old/yast2-storage-2.14.6/libstorage/src/EvmsCo.cc 2006-09-14 18:37:48.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/EvmsCo.cc 2006-09-28 16:33:57.000000000 +0200
@@ -391,7 +391,7 @@
else
{
Evms * l = dynamic_cast(v);
- unsigned long new_le = (newSize+pe_size-1)/pe_size;
+ unsigned long new_le = sizeToLe(newSize);
if( l->stripes()>1 )
new_le = ((new_le+l->stripes()-1)/l->stripes())*l->stripes();
newSize = new_le*pe_size;
@@ -636,7 +636,7 @@
{
//cout << "Resized:" << *i << endl;
map pe_map = i->getPeMap();
- long size_diff = i->getLe() - (i->origSizeK()+pe_size-1)/pe_size;
+ long size_diff = i->getLe() - sizeToLe(i->origSizeK());
if( size_diff>0 )
{
if( addLvPeDistribution( size_diff, i->stripes(), pv, pv_add,
@@ -882,12 +882,12 @@
if( deleted() )
{
l.push_back( new commitAction( DECREASE, staticType(),
- removeCoText(false), true, true ));
+ removeCoText(false), this, true ));
}
else if( created() )
{
l.push_front( new commitAction( INCREASE, staticType(),
- createCoText(false), true, true ));
+ createCoText(false), this, true ));
}
else
{
@@ -896,13 +896,13 @@
++i )
l.push_back( new commitAction( INCREASE, staticType(),
extendCoText(false,i->device),
- true, true ));
+ this, true ));
if( !pv_remove.empty() )
for( list<Pv>::const_iterator i=pv_remove.begin();
i!=pv_remove.end(); ++i )
l.push_back( new commitAction( DECREASE, staticType(),
reduceCoText(false,i->device),
- false, true ));
+ this, false ));
}
}
@@ -1425,10 +1425,12 @@
y2mil( "co:" << *this );
if( !pv_add.empty() )
{
+ y2err( "still added:" << pv_add );
pv_add.clear();
ret = EVMS_PV_STILL_ADDED;
}
checkConsistency();
+ checkCreateConstraints();
}
}
y2milestone( "ret:%d", ret );
@@ -1495,6 +1497,8 @@
}
++d;
}
+ if( devs.size()>0 )
+ checkCreateConstraints();
y2milestone( "ret:%d", ret );
return( ret );
}
@@ -1621,7 +1625,7 @@
FsCapabilities caps;
bool remount = false;
unsigned long new_le = l->getLe();
- unsigned long old_le = (v->origSizeK()+pe_size-1)/pe_size;
+ unsigned long old_le = sizeToLe(v->origSizeK());
getStorage()->getFsCapabilities( l->getFs(), caps );
if( !silent && old_le!=new_le )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/LvmVg.cc new/yast2-storage-2.14.7/libstorage/src/LvmVg.cc
--- old/yast2-storage-2.14.6/libstorage/src/LvmVg.cc 2006-09-14 18:35:07.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/LvmVg.cc 2006-09-28 16:35:29.000000000 +0200
@@ -265,7 +265,7 @@
if( i!=p.end() )
ret = LVM_LV_DUPLICATE_NAME;
}
- unsigned long num_le = (sizeK + pe_size - 1)/pe_size;
+ unsigned long num_le = sizeToLe(sizeK);
if( stripe>1 )
num_le = ((num_le+stripe-1)/stripe)*stripe;
if( ret==0 && free_pe(v);
- unsigned long new_le = (newSize+pe_size-1)/pe_size;
+ unsigned long new_le = sizeToLe(newSize);
if( l->stripes()>1 )
new_le = ((new_le+l->stripes()-1)/l->stripes())*l->stripes();
newSize = new_le*pe_size;
@@ -608,7 +608,7 @@
{
//cout << "Resized:" << *i << endl;
map pe_map = i->getPeMap();
- long size_diff = i->getLe() - (i->origSizeK()+pe_size-1)/pe_size;
+ long size_diff = i->getLe() - sizeToLe(i->origSizeK());
if( size_diff>0 )
{
if( addLvPeDistribution( size_diff, i->stripes(), pv, pv_add,
@@ -767,12 +767,12 @@
if( deleted() )
{
l.push_back( new commitAction( DECREASE, staticType(),
- removeVgText(false), true, true ));
+ removeVgText(false), this, true ));
}
else if( created() )
{
l.push_front( new commitAction( INCREASE, staticType(),
- createVgText(false), true, true ));
+ createVgText(false), this, true ));
}
else
{
@@ -781,13 +781,13 @@
++i )
l.push_back( new commitAction( INCREASE, staticType(),
extendVgText(false,i->device),
- true, true ));
+ this, true ));
if( !pv_remove.empty() )
for( list<Pv>::const_iterator i=pv_remove.begin();
i!=pv_remove.end(); ++i )
l.push_back( new commitAction( DECREASE, staticType(),
reduceVgText(false,i->device),
- false, true ));
+ this, false ));
}
}
@@ -968,10 +968,12 @@
getVgData( name() );
if( !pv_add.empty() )
{
+ y2err( "still added:" << pv_add );
pv_add.clear();
ret = LVM_PV_STILL_ADDED;
}
checkConsistency();
+ checkCreateConstraints();
}
}
y2milestone( "ret:%d", ret );
@@ -1053,6 +1055,8 @@
}
++d;
}
+ if( devs.size()>0 )
+ checkCreateConstraints();
y2mil( "this:" << *this );
y2milestone( "ret:%d", ret );
return( ret );
@@ -1201,7 +1205,7 @@
FsCapabilities caps;
bool remount = false;
unsigned long new_le = l->getLe();
- unsigned long old_le = (v->origSizeK()+pe_size-1)/pe_size;
+ unsigned long old_le = sizeToLe(v->origSizeK());
getStorage()->getFsCapabilities( l->getFs(), caps );
if( !silent && old_le!=new_le )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Partition.cc new/yast2-storage-2.14.7/libstorage/src/Partition.cc
--- old/yast2-storage-2.14.6/libstorage/src/Partition.cc 2006-08-30 16:46:36.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Partition.cc 2006-09-26 18:53:01.000000000 +0200
@@ -524,7 +524,7 @@
if( change_id )
{
l.push_back( new commitAction( INCREASE, cont->staticType(),
- setTypeText(false), false ));
+ setTypeText(false), this, false ));
}
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/PeContainer.cc new/yast2-storage-2.14.7/libstorage/src/PeContainer.cc
--- old/yast2-storage-2.14.6/libstorage/src/PeContainer.cc 2006-09-14 18:40:32.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/PeContainer.cc 2006-09-28 16:36:40.000000000 +0200
@@ -4,6 +4,7 @@
#include <iostream>
#include <sstream>
+#include <utility>
#include "y2storage/PeContainer.h"
#include "y2storage/AppUtil.h"
@@ -311,6 +312,100 @@
return( ret );
}
+unsigned long PeContainer::sizeToLe( unsigned long long sizeK ) const
+ {
+ if( pe_size>0 )
+ {
+ sizeK += pe_size-1;
+ sizeK /= pe_size;
+ }
+ return( sizeK );
+ }
+
+bool PeContainer::addedPv( const string& dev ) const
+ {
+ bool ret = find( pv_add.begin(), pv_add.end(), dev )!=pv_add.end();
+ y2mil( "dev:" << dev << " ret:" << ret );
+ return( ret );
+ }
+
+bool PeContainer::checkCreateConstraints()
+ {
+ y2mil( "peContainer:" << *this )
+ int ret = false;
+ unsigned long increase = 0;
+ unsigned long current = 0;
+ typedef pair tpair;
+ list< tpair > li;
+ VolPair lp=volPair();
+ VolIterator i=lp.begin();
+ if( pv_add.size()>0 )
+ y2war( "should not happen pv_add:" << pv_add )
+ if( pv_remove.size()>0 )
+ y2war( "should not happen pv_rem:" << pv_remove )
+ while( i!=lp.end() )
+ {
+ unsigned long long tmp;
+ if( i->deleted() || i->needShrink() )
+ y2war( "should not happen vol:" << *i )
+ else if( i->created() || i->extendSize()>0 )
+ {
+ tmp = sizeToLe(i->created() ? i->sizeK() : i->extendSize());
+ if( !i->created() )
+ current += sizeToLe( i->origSizeK() );
+ li.push_back( make_pair(tmp,static_cast(&(*i))) );
+ increase += tmp;
+ y2mil( "inc:" << tmp << " sum:" << increase );
+ y2mil( "vol:" << *i )
+ }
+ else
+ current += sizeToLe( i->sizeK() );
+ ++i;
+ }
+ y2mil( "increase:" << increase << " current:" << current << " num_pe:" << num_pe );
+ if( increase+current>num_pe )
+ {
+ unsigned long diff = increase+current - num_pe;
+ y2mil( "too much:" << diff );
+ if( diff<=5 || diff<=pv.size()*2 )
+ {
+ list<unsigned long> l;
+ y2mil( "li:" << li );
+ li.sort();
+ y2mil( "li:" << li );
+ for( list<tpair>::const_iterator i=li.begin(); i!=li.end(); ++i )
+ {
+ unsigned long tmp = (diff * i->first + i->first/2) / increase;
+ l.push_back(tmp);
+ diff -= tmp;
+ increase -= i->first;
+ }
+ y2mil( "l:" << l );
+ list<unsigned long>::const_iterator di = l.begin();
+ for( list<tpair>::const_iterator i=li.begin(); i!=li.end(); ++i )
+ {
+ if( *di > 0 )
+ {
+ y2mil( "modified vol:" << *i->second );
+ map pe_map = i->second->getPeMap();
+ ret = remLvPeDistribution( *di, pe_map, pv, pv_add );
+ i->second->setLe( i->second->getLe()-*di );
+ i->second->setPeMap( pe_map );
+ if( i->second->created() )
+ i->second->calcSize();
+ else
+ i->second->setResizedSize( i->second->getLe()*pe_size );
+ y2mil( "modified vol:" << *i->second );
+ }
+ ++di;
+ }
+ }
+ ret = true;
+ }
+ y2milestone( "ret:%d", ret );
+ return( ret );
+ }
+
void PeContainer::addPv( const Pv* p )
{
list<Pv>::iterator i = find( pv.begin(), pv.end(), *p );
@@ -343,6 +438,7 @@
void
PeContainer::init()
{
+ y2mil( "init:" << nm );
mjr = Dm::dmMajor();
num_pe = free_pe = 0;
pe_size = 1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/PeContainer.h new/yast2-storage-2.14.7/libstorage/src/PeContainer.h
--- old/yast2-storage-2.14.6/libstorage/src/PeContainer.h 2006-09-14 18:30:46.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/PeContainer.h 2006-09-28 16:36:52.000000000 +0200
@@ -23,6 +23,8 @@
unsigned long peFree() const { return free_pe; }
unsigned numPv() const { return pv.size(); }
friend std::ostream& operator<< (std::ostream&, const PeContainer& );
+ bool addedPv( const string& dev ) const;
+ unsigned long sizeToLe( unsigned long long sizeK ) const;
int setPeSize( long long unsigned, bool lvm1 );
void unuseDev();
@@ -65,6 +67,7 @@
unsigned long leByLvRemove() const;
int tryUnusePe( const string& dev, std::list<Pv>& pl, std::list<Pv>& pladd,
std::list<Pv>& plrem, unsigned long& removed_pe );
+ bool checkCreateConstraints();
static int addLvPeDistribution( unsigned long le, unsigned stripe,
std::list<Pv>& pl, std::list<Pv>& pladd,
std::map& pe_map );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/ProcPart.cc new/yast2-storage-2.14.7/libstorage/src/ProcPart.cc
--- old/yast2-storage-2.14.6/libstorage/src/ProcPart.cc 2006-02-07 12:57:14.000000000 +0100
+++ new/yast2-storage-2.14.7/libstorage/src/ProcPart.cc 2006-09-25 14:19:03.000000000 +0200
@@ -53,6 +53,7 @@
extractNthWord( 2, (*this)[i->second] ) >> SizeK;
ret = true;
}
+ y2mil( "dev:" << Dev << " ret:" << ret << " Size:" << (ret?SizeK:0) );
return( ret );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Storage.cc new/yast2-storage-2.14.7/libstorage/src/Storage.cc
--- old/yast2-storage-2.14.6/libstorage/src/Storage.cc 2006-09-14 16:00:29.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Storage.cc 2006-09-26 18:57:42.000000000 +0200
@@ -196,7 +196,7 @@
void Storage::detectObjects()
{
- ProcPart ppart;
+ ProcPart* ppart = new ProcPart;
if( EvmsCo::canDoEvms() )
{
char * file = "/etc/evms.conf";
@@ -206,18 +206,20 @@
}
EvmsCo::activate(true);
}
- detectDisks( ppart );
+ detectDisks( *ppart );
if( instsys() )
{
MdCo::activate( true );
LvmVg::activate( true );
DmraidCo::activate( true );
+ delete ppart;
+ ppart = new ProcPart;
}
detectMds();
detectLvmVgs();
detectEvms();
- detectDmraid( ppart );
- detectDm( ppart );
+ detectDmraid( *ppart );
+ detectDm( *ppart );
LvmVgPair p = lvgPair();
y2mil( "p length:" << p.length() );
@@ -238,7 +240,7 @@
else
{
fstab = new EtcFstab( "/etc", isRootMounted() );
- detectLoops( ppart );
+ detectLoops( *ppart );
detectFsData( vBegin(), vEnd() );
}
EvmsCoIterator e = findEvmsCo( "" );
@@ -254,6 +256,7 @@
rm.execute( "mdadm --stop /dev/" + extractNthWord(0, *c.getLine(i)) );
}
}
+ delete ppart;
}
void Storage::deleteClist( CCont& co )
@@ -1804,6 +1807,34 @@
}
int
+Storage::changeDescText( const string& device, const string& txt )
+ {
+ int ret = 0;
+ assertInit();
+ y2milestone( "device:%s txt:%s", device.c_str(), txt.c_str() );
+ VolIterator vol;
+ ContIterator cont;
+ if( readonly )
+ {
+ ret = STORAGE_CHANGE_READONLY;
+ }
+ else if( findVolume( device, cont, vol ) )
+ {
+ ret = vol->setDescText( txt );
+ }
+ else
+ {
+ ret = STORAGE_VOLUME_NOT_FOUND;
+ }
+ if( ret==0 )
+ {
+ ret = checkCache();
+ }
+ y2milestone( "ret:%d", ret );
+ return( ret );
+ }
+
+int
Storage::changeMountPoint( const string& device, const string& mount )
{
int ret = 0;
@@ -3395,6 +3426,12 @@
if( mark_destructive && (*i)->destructive )
txt += "<font color=red>";
txt += (*i)->descr;
+ const Volume *v = (*i)->vol();
+ if( v && !v->getDescText().empty() )
+ {
+ txt += ". ";
+ txt += v->getDescText();
+ }
if( mark_destructive && (*i)->destructive )
txt += "</font>";
ret.push_back( txt );
@@ -3610,7 +3647,7 @@
{
bool cont = (*ac)->container;
CType type = (*ac)->type;
- Container *co = cont ? (*ac)->co() :
+ Container *co = cont ? const_cast((*ac)->co()) :
const_cast((*ac)->vol()->getContainer());
if( !evms_activate && *pt==INCREASE &&
(type==DISK||type==MD||(cont&&type==EVMS)) )
@@ -3641,7 +3678,7 @@
}
else
{
- ret = co->commitChanges( *pt, (*ac)->vol() );
+ ret = co->commitChanges( *pt, const_cast((*ac)->vol()) );
}
if( ret!=0 )
{
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Storage.h new/yast2-storage-2.14.7/libstorage/src/Storage.h
--- old/yast2-storage-2.14.6/libstorage/src/Storage.h 2006-09-14 16:00:38.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Storage.h 2006-09-26 18:30:32.000000000 +0200
@@ -305,6 +305,7 @@
storage::FsType fs );
int changeLabelVolume( const string& device, const string& label );
int changeMkfsOptVolume( const string& device, const string& opts );
+ int changeDescText( const string& device, const string& txt );
int changeMountPoint( const string& device, const string& mount );
int getMountPoint( const string& device, string& mount );
int changeMountBy( const string& device, storage::MountByType mby );
@@ -1640,8 +1641,11 @@
s << "stage:" << a.stage
<< " type:" << a.type
<< " cont:" << a.container
- << " dest:" << a.destructive
- << " name:" << (a.container?a.co()->name():a.vol()->name());
+ << " dest:" << a.destructive;
+ if( a.container && a.co() )
+ s << " name:" << a.co()->name();
+ else if( a.vol() )
+ s << " name:" << a.vol()->name();
if( !a.descr.empty() )
s << " desc:" << a.descr;
return( s );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/StorageInterface.h new/yast2-storage-2.14.7/libstorage/src/StorageInterface.h
--- old/yast2-storage-2.14.6/libstorage/src/StorageInterface.h 2006-09-06 19:15:04.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/StorageInterface.h 2006-09-26 11:45:53.000000000 +0200
@@ -249,6 +249,7 @@
string label;
string mkfs_options;
string loop;
+ string dtxt;
EncryptType encryption;
string crypt_pwd;
FsType fs;
@@ -1201,6 +1202,16 @@
#endif
/**
+ * Sets the value of description text.
+ * This text will be returned together with the txt returned by getCommitActions
+ *
+ * @param device name of volume, e.g. /dev/hda1
+ * @param txt description text for this partition
+ * @return zero if all is ok, a negative number to indicate an error
+ */
+ virtual int changeDescText( const string& device, const string& txt ) = 0;
+
+ /**
* Adds the specified entry to /etc/fstab
*
* @param device name of volume, e.g. /dev/hda1
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/StorageTypes.h new/yast2-storage-2.14.7/libstorage/src/StorageTypes.h
--- old/yast2-storage-2.14.6/libstorage/src/StorageTypes.h 2006-08-14 19:17:07.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/StorageTypes.h 2006-09-26 18:48:56.000000000 +0200
@@ -30,10 +30,14 @@
struct commitAction
{
- commitAction( CommitStage s, CType t, const string& d, bool destr=false,
- bool cont=false )
- { stage=s; type=t; descr=d; destructive=destr; container=cont;
- u.co=NULL; u.vol=NULL; }
+ commitAction( CommitStage s, CType t, const string& d, const Volume* v,
+ bool destr=false )
+ { stage=s; type=t; descr=d; destructive=destr; container=false;
+ u.vol=v; }
+ commitAction( CommitStage s, CType t, const string& d, const Container* co,
+ bool destr=false )
+ { stage=s; type=t; descr=d; destructive=destr; container=true;
+ u.co=co; }
commitAction( CommitStage s, CType t, Volume* v )
{ stage=s; type=t; destructive=false; container=false; u.vol=v; }
commitAction( CommitStage s, CType t, Container* c )
@@ -45,11 +49,11 @@
bool container;
union
{
- Volume* vol;
- Container* co;
+ const Volume* vol;
+ const Container* co;
} u;
- Container* co() const { return( container?u.co:NULL ); }
- Volume* vol() const { return( container?NULL:u.vol ); }
+ const Container* co() const { return( container?u.co:NULL ); }
+ const Volume* vol() const { return( container?NULL:u.vol ); }
bool operator==( const commitAction& rhs ) const
{ return( stage==rhs.stage && type==rhs.type ); }
bool operator<( const commitAction& rhs ) const
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Volume.cc new/yast2-storage-2.14.7/libstorage/src/Volume.cc
--- old/yast2-storage-2.14.6/libstorage/src/Volume.cc 2006-09-06 19:15:39.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Volume.cc 2006-09-26 18:40:34.000000000 +0200
@@ -1750,42 +1750,42 @@
if( deleted() )
{
l.push_back( new commitAction( DECREASE, cont->type(),
- removeText(false), true ));
+ removeText(false), this, true ));
}
else if( needShrink() )
{
l.push_back( new commitAction( DECREASE, cont->type(),
- resizeText(false), true ));
+ resizeText(false), this, true ));
}
else if( created() )
{
l.push_back( new commitAction( INCREASE, cont->type(),
- createText(false), false ));
+ createText(false), this, false ));
}
else if( needExtend() )
{
l.push_back( new commitAction( INCREASE, cont->type(),
- resizeText(false), true ));
+ resizeText(false), this, true ));
}
else if( format )
{
l.push_back( new commitAction( FORMAT, cont->type(),
- formatText(false), true ));
+ formatText(false), this, true ));
}
else if( mp != orig_mp )
{
l.push_back( new commitAction( MOUNT, cont->type(),
- mountText(false), false ));
+ mountText(false), this, false ));
}
else if( label != orig_label )
{
l.push_back( new commitAction( MOUNT, cont->type(),
- labelText(false), false ));
+ labelText(false), this, false ));
}
else if( needFstabUpdate() )
{
l.push_back( new commitAction( MOUNT, cont->type(),
- fstabUpdateText(), false ));
+ fstabUpdateText(), this, false ));
}
}
@@ -2099,6 +2099,7 @@
info.format = format;
info.create = create;
info.mkfs_options = mkfs_opt;
+ info.dtxt = dtxt;
info.loop = loop_dev;
info.is_mounted = is_mounted;
info.ignore_fs = ignore_fs;
@@ -2252,6 +2253,10 @@
{
s << " mkfsopt:" << v.mkfs_opt;
}
+ if( v.dtxt.length()>0 )
+ {
+ s << " dtxt:" << v.dtxt;
+ }
if( v.alt_names.begin() != v.alt_names.end() )
{
s << " alt_names:" << v.alt_names;
@@ -2363,6 +2368,8 @@
ret += " orig_fstopt:" + orig_fstab_opt + "-->" + rhs.orig_fstab_opt;
if( mkfs_opt!=rhs.mkfs_opt )
ret += " mkfsopt:" + mkfs_opt + "-->" + rhs.mkfs_opt;
+ if( dtxt!=rhs.dtxt )
+ ret += " dtxt:" + dtxt + "-->" + rhs.dtxt;
if( is_loop!=rhs.is_loop )
{
if( rhs.is_loop )
@@ -2406,6 +2413,7 @@
fs==rhs.fs && mount_by==rhs.mount_by &&
uuid==rhs.uuid && label==rhs.label && mp==rhs.mp &&
fstab_opt==rhs.fstab_opt && mkfs_opt==rhs.mkfs_opt &&
+ dtxt==rhs.dtxt &&
is_loop==rhs.is_loop && loop_active==rhs.loop_active &&
is_mounted==rhs.is_mounted && encryption==rhs.encryption &&
loop_dev==rhs.loop_dev && fstab_loop_dev==rhs.fstab_loop_dev &&
@@ -2441,6 +2449,7 @@
fstab_opt = rhs.fstab_opt;
orig_fstab_opt = rhs.orig_fstab_opt;
mkfs_opt = rhs.mkfs_opt;
+ dtxt = rhs.dtxt;
is_loop = rhs.is_loop;
loop_active = rhs.loop_active;
is_mounted = rhs.is_mounted;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/libstorage/src/Volume.h new/yast2-storage-2.14.7/libstorage/src/Volume.h
--- old/yast2-storage-2.14.6/libstorage/src/Volume.h 2006-09-06 18:50:41.000000000 +0200
+++ new/yast2-storage-2.14.7/libstorage/src/Volume.h 2006-09-28 15:21:30.000000000 +0200
@@ -80,7 +80,7 @@
bool needRemount() const;
bool needShrink() const { return(size_korig_size_k); }
- long long extendSize() const { return(orig_size_k-size_k);}
+ long long extendSize() const { return(size_k-orig_size_k);}
storage::FsType getFs() const { return fs; }
void setFs( storage::FsType val ) { detected_fs=fs=val; }
void setUuid( const string& id ) { uuid=id; }
@@ -94,6 +94,8 @@
encryption!=orig_encryption) ); }
const string& getMkfsOption() const { return mkfs_opt; }
int setMkfsOption( const string& val ) { mkfs_opt=val; return 0; }
+ const string& getDescText() const { return dtxt; }
+ int setDescText( const string& val ) { dtxt=val; return 0; }
const std::list<string>& altNames() const { return( alt_names ); }
unsigned nr() const { return num; }
unsigned long long sizeK() const { return size_k; }
@@ -235,6 +237,7 @@
unsigned long long size_k;
unsigned long long orig_size_k;
string dev;
+ string dtxt;
unsigned long mnr;
unsigned long mjr;
storage::usedBy uby;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/storage/src/include/do_proposal_flexible.ycp new/yast2-storage-2.14.7/storage/src/include/do_proposal_flexible.ycp
--- old/yast2-storage-2.14.6/storage/src/include/do_proposal_flexible.ycp 2006-09-21 13:11:58.000000000 +0200
+++ new/yast2-storage-2.14.7/storage/src/include/do_proposal_flexible.ycp 2006-09-26 19:06:38.000000000 +0200
@@ -14,7 +14,7 @@
*
*************************************************************
- $Id: do_proposal_flexible.ycp 33024 2006-09-21 11:13:35Z fehr $
+ $Id: do_proposal_flexible.ycp 33142 2006-09-26 17:06:33Z fehr $
*/
{
@@ -1597,15 +1597,15 @@
if( Partitions::IsDosWinNtPartition( fsid ) )
{
win = p["winfo"]:$[];
- y2milestone( "win=%1", win );
- if( win != nil && p["size_k"]:0 > 1024*1024 )
+ y2milestone( "try_resize_windows win=%1", win );
+ if( win != nil && win["ok"]:false && p["size_k"]:0 > 1024*1024 )
{
p["winfo"] = win;
p["resize"] = true;
p["region",1] = (win["new_size"]:0 + cyl_size - 1) / cyl_size;
p["win_max_length"] =
(win["max_win_size"]:0 + cyl_size - 1) / cyl_size;
- y2milestone( "win part %1", p );
+ y2milestone( "try_resize_windows win part %1", p );
}
}
return( p );
@@ -2476,12 +2476,18 @@
return( ret );
}
-boolean usable_for_win_resize( map p )
+boolean usable_for_win_resize( map p, boolean assert_cons_fs )
{
boolean ret = Partitions::IsDosWinNtPartition( p["fsid"]:0 ) &&
- size(p["winfo"]:$[])>0 &&
p["size_k"]:0 > 1024*1024 &&
!p["resize"]:false && !p["delete"]:false;
+ if( ret )
+ {
+ if( assert_cons_fs )
+ ret = p["winfo","ok"]:false;
+ else
+ ret = size(p["winfo"]:$[])>0;
+ }
return( ret );
}
@@ -2640,7 +2646,11 @@
``{
if( !contains( Partitions::do_not_delete,
p["fsid"]:0 ))
+ {
+ if( usable_for_win_resize(p,false) )
+ p["dtxt"] = _("Resize impossible due to inconsistent fs. Try checking fs under Windows.");
p["delete"] = true;
+ }
return( p );
});
});
@@ -2677,7 +2687,7 @@
valid = listmap( string s, ddev,
``{
if( find( map p, target[s,"partitions"]:[],
- ``(usable_for_win_resize(p))) != nil )
+ ``(usable_for_win_resize(p,true))) != nil )
return( $[s:true] );
else
return( $[s:false] );
@@ -2685,7 +2695,7 @@
foreach( string s, filter( string d, ddev, ``(valid[d]:false)),
``{
list<map> pl = filter( map p, target[s,"partitions"]:[],
- ``(usable_for_win_resize(p)));
+ ``(usable_for_win_resize(p,true)));
if( size(pl)>0 )
{
pl = sort( map a, map b, pl,
@@ -2693,7 +2703,7 @@
target[s,"partitions"] =
maplist( map p, target[s,"partitions"]:[],
``{
- if( usable_for_win_resize(p) &&
+ if( usable_for_win_resize(p,true) &&
p["device"]:""==pl[0,"device"]:"" )
{
integer cs = target[s,"cyl_size"]:1;
@@ -2863,15 +2873,16 @@
string max_disk = "";
foreach( string s, list mb, size_mb,
``{
- if( (!Storage::ProposalHome() || mb[1]:0>0) &&
+ if( (!Storage::ProposalHome() || mb[1]:0>0 || mode==`resize ) &&
mb[1]:0+mb[0]:0 > max_mb )
{
max_mb = mb[1]:0+mb[0]:0;
max_disk = s;
}
});
+ y2milestone( "max_mb %1 size_mb %2", max_mb, size_mb );
if( max_mb>0 && size_mb[max_disk,0]:0 > 2*1024 &&
- ( !Storage::ProposalHome() || size_mb[max_disk,1]:0 > 1*1024) )
+ ( !Storage::ProposalHome() || size_mb[max_disk,1]:0 > 1*1024 ))
{
sol_disk = max_disk;
}
@@ -2889,6 +2900,21 @@
mode = `desparate;
else if( mode == `desparate )
mode = `end;
+ if( mode == `desparate && size(sol_disk)==0 )
+ {
+ max_mb = 0;
+ foreach( string s, list mb, size_mb,
+ ``{
+ if( mb[1]:0+mb[0]:0 > max_mb &&
+ size_mb[max_disk,0]:0 > 2*1024 )
+ {
+ max_mb = mb[1]:0+mb[0]:0;
+ sol_disk = s;
+ }
+ });
+ y2milestone( "get_inst_proposal mode %1 sol_disk %2",
+ mode, sol_disk );
+ }
}
}
y2milestone( "get_inst_proposal sol_disk %1", sol_disk );
@@ -3395,6 +3421,7 @@
if( mode == `desparate )
{
ddev = get_disk_try_list( target, false );
+ valid = listmap( string s, ddev, ``($[s:true]));
target = prepare_part_lists( ddev, target );
foreach( string s, ddev,
``{
@@ -3405,7 +3432,11 @@
``{
if( !contains( Partitions::do_not_delete,
p["fsid"]:0 ))
+ {
+ if( usable_for_win_resize(p,false) )
+ p["dtxt"] = _("Resize impossible due to inconsistent fs. Try checking fs under Windows.");
p["delete"] = true;
+ }
return( p );
});
});
@@ -3433,7 +3464,7 @@
valid = listmap( string s, ddev,
``{
if( find( map p, target[s,"partitions"]:[],
- ``(usable_for_win_resize(p))) != nil )
+ ``(usable_for_win_resize(p,true))) != nil )
return( $[s:true] );
else
return( $[s:false] );
@@ -3441,7 +3472,7 @@
foreach( string s, filter( string d, ddev, ``(valid[d]:false)),
``{
list<map> pl = filter( map p, target[s,"partitions"]:[],
- ``(usable_for_win_resize(p)));
+ ``(usable_for_win_resize(p,true)));
if( size(pl)>0 )
{
pl = sort( map a, map b, pl,
@@ -3449,7 +3480,7 @@
target[s,"partitions"] =
maplist( map p, target[s,"partitions"]:[],
``{
- if( usable_for_win_resize(p) &&
+ if( usable_for_win_resize(p,true) &&
p["device"]:""==pl[0,"device"]:"" )
{
integer cs = target[s,"cyl_size"]:1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/storage/src/inst_custom_part.ycp new/yast2-storage-2.14.7/storage/src/inst_custom_part.ycp
--- old/yast2-storage-2.14.6/storage/src/inst_custom_part.ycp 2006-09-20 12:26:33.000000000 +0200
+++ new/yast2-storage-2.14.7/storage/src/inst_custom_part.ycp 2006-09-26 19:06:38.000000000 +0200
@@ -26,7 +26,7 @@
*
*************************************************************
- $Id: inst_custom_part.ycp 33002 2006-09-20 10:28:09Z fehr $
+ $Id: inst_custom_part.ycp 33142 2006-09-26 17:06:33Z fehr $
*/
{
@@ -1614,7 +1614,7 @@
if( !swap && !cur_val["format"]:false )
{
df = Storage::GetFreeSpace( device, 0, cur_val["used_fs"]:`none, true );
- if( size(df)==0 )
+ if( size(df)==0 || !df["ok"]:false )
{
y2error( "failed GetFreeSpace %1 fs:%2", device,
cur_val["used_fs"]:`none );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/storage/src/modules/FileSystems.ycp new/yast2-storage-2.14.7/storage/src/modules/FileSystems.ycp
--- old/yast2-storage-2.14.6/storage/src/modules/FileSystems.ycp 2006-09-21 13:11:58.000000000 +0200
+++ new/yast2-storage-2.14.7/storage/src/modules/FileSystems.ycp 2006-09-26 18:17:47.000000000 +0200
@@ -7,7 +7,7 @@
* These module contains the supported filesystems and their settings.
*
*
- * $Id: FileSystems.ycp 33024 2006-09-21 11:13:35Z fehr $
+ * $Id: FileSystems.ycp 33141 2006-09-26 16:17:44Z fehr $
*/
{
module "FileSystems";
@@ -1350,7 +1350,7 @@
ret["opt_dir_index"] = $[ "option_str":"-O dir_index",
"option_value":true ];
}
- if( Arch::s390() && contains( [`ext2, `ext3, `xfs, `reiser], fsys ) )
+ if( Arch::s390() && contains( [`ext2, `ext3], fsys ) )
{
ret["opt_blocksize"] = $[ "option_str":"-b",
"option_value":"4096" ];
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.14.6/storage/src/modules/Storage.ycp new/yast2-storage-2.14.7/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.14.6/storage/src/modules/Storage.ycp 2006-09-21 13:11:58.000000000 +0200
+++ new/yast2-storage-2.14.7/storage/src/modules/Storage.ycp 2006-09-26 19:08:23.000000000 +0200
@@ -19,7 +19,7 @@
* wurde versucht "intelligent" zu gestallten und ist im einzelen bei den
* entspechenden Funktionen näher erklärt.
*
- * $Id: Storage.ycp 33024 2006-09-21 11:13:35Z fehr $
+ * $Id: Storage.ycp 33143 2006-09-26 17:08:22Z fehr $
*/
{
@@ -567,7 +567,7 @@
global define map GetFreeSpace( string device, integer testsize,
symbol used_fs, boolean verbose )
``{
- if( Mode::test () )
+ if( Mode::test() )
{
integer wf = tointeger(tofloat(testsize) * 0.6);
integer wu = tointeger(tofloat(testsize) * 0.4);
@@ -586,20 +586,17 @@
df_free, used, win_disk,
used_fs==`ntfs );
- if( r )
- {
- resize_free = resize_free * 1024; // Byte
- df_free = df_free * 1024; // Byte
- used = used * 1024; // Byte
- }
+ resize_free = resize_free * 1024; // Byte
+ df_free = df_free * 1024; // Byte
+ used = used * 1024; // Byte
if( used_fs == `ntfs && !r && verbose )
{
string cmd = sformat("ntfsresize -f -i %1", device );
- y2milestone( "Executing cmd:%1", cmd );
+ y2milestone( "GetFreeSpace Executing cmd:%1", cmd );
map bcall = (map) SCR::Execute( .target.bash_output, cmd,
$[ "LC_MESSAGES" :"POSIX"] );
- y2milestone( "Executing ret:%1", bcall );
+ y2milestone( "GetFreeSpace Executing ret:%1", bcall );
string tmp = _("Resize Not Possible:") + "\n\n";
tmp = tmp + bcall["stdout"]:"" + bcall["stderr"]:"";
Popup::Error( tmp );
@@ -610,46 +607,49 @@
integer min_linux_size = 0;
integer add_free = df_free - resize_free;
- if( resize_free < 300000000 )
+ y2milestone( "GetFreeSpace resize_free %1 add_free %2",
+ resize_free, add_free );
+
+ if( resize_free < 300*1024*1024 || !r )
{
linux_size = 0;
min_linux_size = 0;
}
- else if( resize_free < 600000000 )
+ else if( resize_free < 600*1024*1024 )
{
linux_size = resize_free;
- if( add_free < 75000000 )
+ if( add_free < 75*1024*1024 )
{
- linux_size = linux_size - 75000000 + add_free;
+ linux_size = linux_size - 75*1024*1024 + add_free;
}
min_linux_size = linux_size;
}
- else if ( resize_free < 1000000000 )
+ else if ( resize_free < 1024*1024*1024 )
{
linux_size = resize_free;
- if( add_free < 200000000 )
+ if( add_free < 200*1024*1024 )
{
- linux_size = linux_size - 200000000 + add_free;
+ linux_size = linux_size - 200*1024*1024 + add_free;
}
- min_linux_size = 300000000;
+ min_linux_size = 300*1024*1024;
}
- else if ( resize_free < 2000000000 )
+ else if ( resize_free < 2*1024*1024*1024 )
{
linux_size = resize_free;
- if( add_free < 300000000 )
+ if( add_free < 300*1024*1024 )
{
- linux_size = linux_size - 300000000 + add_free;
+ linux_size = linux_size - 300*1024*1024 + add_free;
}
- min_linux_size = 500000000;
+ min_linux_size = 500*1024*1024;
}
- else if ( resize_free < 3000000000 )
+ else if ( resize_free < 3*1024*1024*1024 )
{
linux_size = resize_free;
- if( add_free < 800000000 )
+ if( add_free < 800*1024*1024 )
{
- linux_size = linux_size - 800000000 + add_free;
+ linux_size = linux_size - 800*1024*1024 + add_free;
}
- min_linux_size = 500000000;
+ min_linux_size = 500*1024*1024;
}
else
{
@@ -658,7 +658,7 @@
{
linux_size = linux_size - resize_free/3 + add_free;
}
- min_linux_size = 500000000;
+ min_linux_size = 500*1024*1024;
}
integer new_size = used + add_free + resize_free - linux_size;
@@ -671,7 +671,8 @@
"max_win_size":used + resize_free + add_free - min_linux_size,
"ntfs" : (used_fs == `ntfs),
"new_size":new_size ];
- y2milestone( "GetFreeSpace ret %1", ret );
+ ret["ok"] = r;
+ y2milestone( "GetFreeSpace %1 ret %2", device, ret );
return( ret );
};
@@ -687,7 +688,7 @@
contains( [ `ntfs, `vfat ], p["used_fs"]:`none ))
{
p["winfo"] = GetFreeSpace( p["device"]:"", 0,
- p["used_fs"]:`none, false );
+ p["used_fs"]:`none, false );
y2milestone( "AddWinInfo %1", p );
}
return( p );
@@ -958,6 +959,14 @@
opts = substring( opts, pos );
}
});
+ if( !found )
+ {
+ pos = findfirstnotof( opts, " \t" );
+ if( pos>0 )
+ opts = substring( opts, pos );
+ else
+ opts = "";
+ }
y2milestone( "convertStringToFsOptionMap opts:%1 ret:%2", opts, ret );
}
y2milestone( "convertStringToFsOptionMap ret:%1", ret );
@@ -1081,6 +1090,9 @@
if( haskey( p, "fs_options" ))
p = remove( p, "fs_options" );
}
+ tmp = LibStorage::VolumeInfo::swig_dtxt_get(vinfo);
+ if( size(tmp)>0 )
+ p["dtxt"] = tmp;
tmp = LibStorage::VolumeInfo::swig_uuid_get(vinfo);
if( size(tmp)>0 )
p["uuid"] = tmp;
@@ -2213,6 +2225,12 @@
return( ret==0 );
}
+integer ChangeDescText( string dev, string txt )
+ {
+ integer ret = LibStorage::StorageInterface::changeDescText( sint, dev, txt );
+ return( ret );
+ }
+
global boolean ChangeVolumeProperties( map part )
{
integer ret = 0;
@@ -2318,6 +2336,11 @@
changed = true;
SetCrypt( dev, part["enc_type"]:`none!=`none, part["format"]:false );
}
+ if( ret==0 && part["dtxt"]:"" != curr["dtxt"]:"" )
+ {
+ changed = true;
+ ret = ChangeDescText( dev, part["dtxt"]:"" );
+ }
if( ret==0 &&
((part["resize"]:false && part["region",1]:0 != curr["region",1]:0) ||
(part["resize"]:false != curr["resize"]:false)) )
@@ -3226,7 +3249,12 @@
{
dps = sort( map a, map b, dps, ``(a["nr"]:0>b["nr"]:0));
}
- foreach( map p, dps, ``{DeleteDevice( k, p["device"]:"" );});
+ foreach( map p, dps,
+ ``{
+ if( size(p["dtxt"]:"")>0 )
+ ChangeDescText( p["device"]:"", p["dtxt"]:"" );
+ DeleteDevice( k, p["device"]:"" );
+ });
if( target[k,"delete"]:false )
{
if( target[k,"type"]:`CT_UNKNOWN==`CT_LVM )
@@ -5179,6 +5207,15 @@
}
});
}
+ if( size(disk["driver"]:"")>0 )
+ {
+ string m = disk["driver"]:"";
+ y2milestone( "adding driver modules %1", m );
+ if( !contains( initrdmodules, m ))
+ {
+ initrdmodules = add( initrdmodules, m );
+ }
+ }
SCR::UnmountAgent (.proc.modules);
map lmod = (map) SCR::Read(.proc.modules);
y2milestone( "GetRootInitrdModules lmod:%1", lmod );
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org