Hello community,
here is the log from the commit of package yast2-storage
checked in at Tue Mar 27 13:48:01 CEST 2007.
--------
--- yast2-storage/yast2-storage.changes 2007-03-15 18:43:26.000000000 +0100
+++ /mounts/work_src_done/STABLE/yast2-storage/yast2-storage.changes 2007-03-27 11:58:15.000000000 +0200
@@ -1,0 +2,22 @@
+Tue Mar 27 11:33:38 CEST 2007 - fehr@suse.de
+
+- make Storage::SetPartitionData also work with /dev/disk/by-
+ devices (#257696)
+- version 2.15.7
+
+-------------------------------------------------------------------
+Mon Mar 26 12:41:14 CEST 2007 - fehr@suse.de
+
+- prefer scsi-link when more than one udev id is present (#251338)
+
+-------------------------------------------------------------------
+Wed Mar 21 17:57:18 CET 2007 - fehr@suse.de
+
+- add hotplug option to fstab entries for iSCSI disks (#250667)
+
+-------------------------------------------------------------------
+Mon Mar 19 18:14:23 CET 2007 - fehr@suse.de
+
+- activate EVMS if no trivial EVMS maps are present
+
+-------------------------------------------------------------------
Old:
----
yast2-storage-2.15.6.tar.bz2
New:
----
yast2-storage-2.15.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ yast2-storage.spec ++++++
--- /var/tmp/diff_new_pack.H22940/_old 2007-03-27 13:47:40.000000000 +0200
+++ /var/tmp/diff_new_pack.H22940/_new 2007-03-27 13:47:40.000000000 +0200
@@ -1,5 +1,5 @@
#
-# spec file for package yast2-storage (Version 2.15.6)
+# spec file for package yast2-storage (Version 2.15.7)
#
# Copyright (c) 2007 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.15.6
+Version: 2.15.7
Release: 1
License: GNU General Public License (GPL)
Group: System/YaST
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source0: yast2-storage-2.15.6.tar.bz2
+Source0: yast2-storage-2.15.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
# Required only in inst-sys
@@ -42,7 +42,7 @@
%prep
-%setup -n yast2-storage-2.15.6
+%setup -n yast2-storage-2.15.7
%build
%{prefix}/bin/y2tool y2autoconf
@@ -168,6 +168,16 @@
%doc %{prefix}/share/doc/packages/yast2-storage/config.xml.description
%changelog
+* Tue Mar 27 2007 - fehr@suse.de
+- make Storage::SetPartitionData also work with /dev/disk/by-
+ devices (#257696)
+- version 2.15.7
+* Mon Mar 26 2007 - fehr@suse.de
+- prefer scsi-link when more than one udev id is present (#251338)
+* Wed Mar 21 2007 - fehr@suse.de
+- add hotplug option to fstab entries for iSCSI disks (#250667)
+* Mon Mar 19 2007 - fehr@suse.de
+- activate EVMS if no trivial EVMS maps are present
* Thu Mar 15 2007 - fehr@suse.de
- fix sort order for deleted partition with same number (#254599)
- prevent removal of to-be-created logical partitions if extended
++++++ yast2-storage-2.15.6.tar.bz2 -> yast2-storage-2.15.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/libstorage/src/Disk.cc new/yast2-storage-2.15.7/libstorage/src/Disk.cc
--- old/yast2-storage-2.15.6/libstorage/src/Disk.cc 2007-03-15 13:18:09.000000000 +0100
+++ new/yast2-storage-2.15.7/libstorage/src/Disk.cc 2007-03-26 12:36:15.000000000 +0200
@@ -30,7 +30,7 @@
unsigned long long SizeK ) :
Container(s,"",staticType())
{
- init_disk = dmp_slave = false;
+ init_disk = dmp_slave = iscsi = false;
nm = Name;
undevDevice(nm);
logfile_name = nm;
@@ -52,7 +52,7 @@
y2milestone( "constructed disk %s nr %u sizeK:%llu", Name.c_str(), num,
SizeK );
logfile_name = Name + decString(num);
- init_disk = dmp_slave = false;
+ init_disk = dmp_slave = iscsi = false;
ronly = true;
size_k = SizeK;
head = new_head = 16;
@@ -71,7 +71,7 @@
Disk::Disk( Storage * const s, const string& fname ) :
Container(s,"",staticType())
{
- init_disk = dmp_slave = false;
+ init_disk = dmp_slave = iscsi = false;
nm = fname.substr( fname.find_last_of( '/' )+1);
if( nm.find("disk_")==0 )
nm.erase( 0, 5 );
@@ -193,6 +193,16 @@
udev_id.erase( i );
}
y2mil( "id:" << udev_id );
+ if( udev_id.size()>1 )
+ {
+ i = find_if( udev_id.begin(), udev_id.end(), find_begin( "scsi-" ) );
+ if( i!=udev_id.end() && i!=udev_id.begin() )
+ {
+ string tmp = *i;
+ udev_id.erase( i );
+ udev_id.push_front(tmp);
+ }
+ }
PartPair pp = partPair();
for( PartIter p=pp.begin(); p!=pp.end(); ++p )
{
@@ -311,8 +321,19 @@
{
ret = false;
}
- y2milestone( "Ret:%d Range:%ld Major:%ld Minor:%ld", ret, range, mjr,
- mnr );
+ SysfsFile = sysfs_dir+"/device";
+ char lbuf[1024+1];
+ int count;
+ if( access( SysfsFile.c_str(), R_OK )==0 &&
+ (count=readlink( SysfsFile.c_str(), lbuf, sizeof(lbuf) ))>0 )
+ {
+ string lname( lbuf, count );
+ if( lname.find( "/session" )!=string::npos )
+ iscsi = true;
+ y2mil( "lname:" << lname );
+ }
+ y2milestone( "Ret:%d Range:%ld Major:%ld Minor:%ld iSCSI:%d",
+ ret, range, mjr, mnr, iscsi );
return( ret );
}
@@ -865,8 +886,8 @@
y2mil( "regex " << reg << " ps " << ps );
for( list<string>::const_iterator i=ps.begin(); i!=ps.end(); i++ )
{
- pair p = getDiskPartition( *i );
- if( p.second>=0 && p.second!=ext_nr &&
+ pair p = getDiskPartition( *i );
+ if( p.second>0 && p.second!=ext_nr &&
pp.getInfo( *i, SizeK, Dummy, Dummy ))
{
proc_l[unsigned(p.second)] = kbToCylinder( SizeK );
@@ -916,11 +937,11 @@
{
unsigned long cyl;
unsigned long long s;
- pair pr = getDiskPartition( *i );
+ pair pr = getDiskPartition( *i );
if( pp.getSize( *i, s ))
{
cyl = kbToCylinder(s);
- if( pr.second < (long)range )
+ if( pr.second!=0 && pr.second < range )
{
unsigned id = Partition::ID_LINUX;
PartitionType type = PRIMARY;
@@ -931,7 +952,7 @@
type = EXTENDED;
id = Partition::ID_EXTENDED;
}
- if( (unsigned)pr.second>max_primary )
+ if( pr.second>max_primary )
{
type = LOGICAL;
}
@@ -941,7 +962,7 @@
type, id, false );
pl.push_back( p );
}
- else
+ else if( pr.second>0 )
range_exceed = max( range_exceed, (unsigned long)pr.second );
cyl_start += cyl;
}
@@ -1036,19 +1057,28 @@
return( getPartName( dev, nr ) );
}
-pair Disk::getDiskPartition( const string& dev )
+pair Disk::getDiskPartition( const string& dev )
{
- long nr = -1;
+ static Regex prx( "[0123456789]p[0123456789]+$" );
+ static Regex partrx( "-part[0123456789]+$" );
+ unsigned nr = 0;
string disk = dev;
- bool need_p = Disk::needP(dev);
+ bool need_p = prx.match( dev );
+ bool part = partrx.match( dev );
string::size_type p = dev.find_last_not_of( "0123456789" );
- if( p != string::npos && (!need_p||dev[p]=='p') && isdigit(dev[p+1]))
+ if( p != string::npos && p> nr;
- disk = dev.substr( 0, p+(need_p?0:1));
+ unsigned pos = p+1;
+ if( need_p )
+ pos--;
+ else if( part )
+ pos -= 5;
+ disk = dev.substr( 0, pos );
}
- y2mil( "dev:" << " disk:" << disk << " nr:" << nr );
- return( make_pair(disk,nr) );
+ y2mil( "dev:" << dev << " disk:" << disk << " nr:" << nr );
+ return( make_pair(disk,nr) );
}
static bool isExtended( const Partition& p )
@@ -2483,6 +2513,7 @@
info.maxLogical = maxLogical();
info.maxPrimary = maxPrimary();
info.initDisk = init_disk;
+ info.iscsi = iscsi;
info.udevPath = udev_path;
info.udevId = mergeString( udev_id );
tinfo = info;
@@ -2515,6 +2546,8 @@
s << " ExtPossible MaxLogical:" << d.max_logical;
if( d.init_disk )
s << " InitDisk";
+ if( d.iscsi )
+ s << " iSCSI";
if( d.dmp_slave )
s << " DmpSlave";
return( s );
@@ -2561,6 +2594,13 @@
else
log += " InitDisk-->";
}
+ if( iscsi!=d.iscsi )
+ {
+ if( d.init_disk )
+ log += " -->iSCSI";
+ else
+ log += " iSCSI-->";
+ }
y2milestone( "%s", log.c_str() );
ConstPartPair p=partPair();
ConstPartIter i=p.begin();
@@ -2602,8 +2642,9 @@
mjr==rhs.mjr && mnr==rhs.mnr && range==rhs.range &&
size_k==rhs.size_k && max_primary==rhs.max_primary &&
ext_possible==rhs.ext_possible && max_logical==rhs.max_logical &&
- init_disk==rhs.init_disk && label==rhs.label &&
- sysfs_dir==rhs.sysfs_dir && dmp_slave==rhs.dmp_slave;
+ init_disk==rhs.init_disk && label==rhs.label &&
+ iscsi==rhs.iscsi && sysfs_dir==rhs.sysfs_dir &&
+ dmp_slave==rhs.dmp_slave;
if( ret )
{
ConstPartPair p = partPair();
@@ -2638,6 +2679,7 @@
ext_possible = rhs.ext_possible;
max_logical = rhs.max_logical;
init_disk = rhs.init_disk;
+ iscsi = rhs.iscsi;
udev_path = rhs.udev_path;
udev_id = rhs.udev_id;
mp_alias = rhs.mp_alias;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/libstorage/src/Disk.h new/yast2-storage-2.15.7/libstorage/src/Disk.h
--- old/yast2-storage-2.15.6/libstorage/src/Disk.h 2007-03-14 13:14:42.000000000 +0100
+++ new/yast2-storage-2.15.7/libstorage/src/Disk.h 2007-03-21 19:35:40.000000000 +0100
@@ -103,7 +103,7 @@
static string getPartName( const string& disk, unsigned nr );
static string getPartName( const string& disk, const string& nr );
- static std::pair getDiskPartition( const string& dev );
+ static std::pair getDiskPartition( const string& dev );
static unsigned long long maxSizeLabelK( const string& label );
protected:
@@ -223,6 +223,7 @@
unsigned max_primary;
bool ext_possible;
bool init_disk;
+ bool iscsi;
bool dmp_slave;
unsigned max_logical;
unsigned long byte_cyl;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/libstorage/src/Storage.cc new/yast2-storage-2.15.7/libstorage/src/Storage.cc
--- old/yast2-storage-2.15.6/libstorage/src/Storage.cc 2007-03-15 13:18:09.000000000 +0100
+++ new/yast2-storage-2.15.7/libstorage/src/Storage.cc 2007-03-27 12:00:01.000000000 +0200
@@ -1993,7 +1993,7 @@
else
{
mby = defaultMountBy;
- pair dp = Disk::getDiskPartition(device);
+ pair dp = Disk::getDiskPartition(device);
y2mil( "dp:" << dp );
DiskIterator i = findDisk( dp.first );
if( (i==dEnd()) || (mby == MOUNTBY_ID && i->udevId().empty()) ||
@@ -2182,7 +2182,7 @@
{
int ret = 0;
assertInit();
- y2milestone( "device:%s l:%u", device.c_str(), pwd.length() );
+ y2milestone( "device:%s l:%zu", device.c_str(), pwd.length() );
#ifdef DEBUG_LOOP_CRYPT_PASSWORD
y2milestone( "password:%s", pwd.c_str() );
#endif
@@ -4213,6 +4213,136 @@
}
}
+int
+Storage::getContVolInfo( const string& device, ContVolInfo& info)
+ {
+ int ret = 0;
+ string dev = device;
+ ContIterator c;
+ VolIterator v;
+ info.type = CUNKNOWN;
+ assertInit();
+ if( findVolume( dev, c, v ))
+ {
+ info.type = c->type();
+ info.cname = c->device();
+ info.vname = v->name();
+ info.numeric = v->isNumeric();
+ if( info.numeric )
+ info.nr = v->nr();
+ else
+ info.nr = 0;
+ }
+ else
+ {
+ DiskIterator d;
+ DmraidCoIterator r;
+ std::pair p = Disk::getDiskPartition( dev );
+ if( p.first=="/dev/md" )
+ {
+ info.cname = p.first;
+ info.vname = undevDevice(device);
+ info.type = MD;
+ info.numeric = true;
+ info.nr = p.second;
+ }
+ else if( p.first=="/dev/loop" )
+ {
+ info.cname = p.first;
+ info.vname = undevDevice(device);
+ info.type = LOOP;
+ info.numeric = true;
+ info.nr = p.second;
+ }
+ else if( p.first=="/dev/dm-" )
+ {
+ info.cname = p.first;
+ info.vname = undevDevice(device);
+ info.type = DM;
+ info.numeric = true;
+ info.nr = p.second;
+ }
+ else if( (d=findDisk(p.first))!=dEnd() )
+ {
+ info.cname = d->device();
+ info.vname = dev.substr( dev.find_last_of('/')+1 );
+ info.type = DISK;
+ info.numeric = true;
+ info.nr = p.second;
+ }
+ else if( (r=findDmraidCo(p.first))!=dmrCoEnd() )
+ {
+ info.cname = d->device();
+ info.vname = dev.substr( dev.find_last_of('/')+1 );
+ info.type = DMRAID;
+ info.numeric = true;
+ info.nr = p.second;
+ }
+ else if( dev.find("/dev/evms/")==0 )
+ {
+ info.type = EVMS;
+ info.numeric = false;
+ info.vname = dev.substr( dev.find_last_of('/')+1 );
+ info.cname = dev.substr( 0, dev.find_last_of('/') );
+ }
+ else if( dev.find("/dev/disk/by-uuid/")==0 ||
+ dev.find("/dev/disk/by-label/")==0 ||
+ dev.find("UUID=")==0 || dev.find("LABEL=")==0 )
+ {
+ if( dev[0] == '/' )
+ {
+ bool uuid = dev.find( "/by-uuid/" )!=string::npos;
+ dev.erase( 0, dev.find_last_of('/')+1 );
+ dev = (uuid?"UUID=":"LABEL=")+dev;
+ }
+ if( findVolume(dev, v) )
+ {
+ info.type = v->cType();
+ info.numeric = v->isNumeric();
+ if( info.numeric )
+ info.nr = v->nr();
+ info.vname = v->name();
+ info.cname = v->getContainer()->name();
+ }
+ }
+ else if( (dev.find("/dev/disk/by-id/")==0 &&
+ (d=findDiskId(p.first))!=dEnd()) ||
+ (dev.find("/dev/disk/by-path/")==0 &&
+ (d=findDiskPath(p.first))!=dEnd()) )
+ {
+ info.type = DISK;
+ info.numeric = true;
+ info.nr = p.second;
+ info.cname = d->device();
+ if( p.second>0 )
+ info.vname = Disk::getPartName( d->name(), p.second );
+ else
+ info.vname = d->name();
+ if( info.vname.find('/')!=string::npos )
+ info.vname.erase( 0, info.vname.find_last_of('/')+1 );
+ }
+ else if( splitString( dev, "/" ).size()==3 && !Disk::needP( dev ) )
+ {
+ info.type = LVM;
+ info.numeric = false;
+ info.vname = dev.substr( dev.find_last_of('/')+1 );
+ info.cname = dev.substr( 0, dev.find_last_of('/') );
+ }
+ else
+ {
+ info.cname = p.first;
+ info.vname = dev.substr( dev.find_last_of('/')+1 );
+ info.numeric = true;
+ info.nr = p.second;
+ }
+ }
+ y2mil( "dev:" << dev << " ret:" << ret << " cn:" << info.cname <<
+ " vn:" << info.vname )
+ if( info.numeric )
+ y2mil( "nr:" << info.nr );
+ return( ret );
+ }
+
int
Storage::getVolume( const string& device, VolumeInfo& info )
{
@@ -5094,6 +5224,40 @@
return( ret );
}
+Storage::DiskIterator Storage::findDiskId( const string& id )
+ {
+ assertInit();
+ string val = id;
+ if( val.find( '/' )!=string::npos )
+ val.erase( 0, val.find_last_of('/')+1 );
+ DiskPair p = dPair();
+ DiskIterator ret=p.begin();
+ bool found = false;
+ while( ret != p.end() && !found )
+ {
+ const std::list<string>& ul( ret->udevId() );
+ found = find(ul.begin(),ul.end(),val) != ul.end();
+ if( !found )
+ ++ret;
+ }
+ y2mil( "ret:" << (ret!=p.end()?ret->device():"NULL") );
+ return( ret );
+ }
+
+Storage::DiskIterator Storage::findDiskPath( const string& path )
+ {
+ assertInit();
+ string val = path;
+ if( val.find( '/' )!=string::npos )
+ val.erase( 0, val.find_last_of('/')+1 );
+ DiskPair p = dPair();
+ DiskIterator ret=p.begin();
+ while( ret != p.end() && ret->udevPath()!=val )
+ ++ret;
+ y2mil( "ret:" << (ret!=p.end()?ret->device():"NULL") );
+ return( ret );
+ }
+
Storage::LvmVgIterator Storage::findLvmVg( const string& name )
{
assertInit();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/libstorage/src/Storage.h new/yast2-storage-2.15.7/libstorage/src/Storage.h
--- old/yast2-storage-2.15.6/libstorage/src/Storage.h 2007-03-14 13:14:42.000000000 +0100
+++ new/yast2-storage-2.15.7/libstorage/src/Storage.h 2007-03-21 20:01:21.000000000 +0100
@@ -277,6 +277,7 @@
int getLoopInfo( dequestorage::LoopInfo& plist );
int getDmraidInfo( const string& name,
dequestorage::DmraidInfo& plist );
+ int getContVolInfo( const string& dev, ContVolInfo& info);
bool getFsCapabilities( storage::FsType fstype,
storage::FsCapabilities& fscapabilities) const;
@@ -1575,6 +1576,8 @@
void addToList( Container* e )
{ pointerIntoSortedList<Container>( cont, e ); }
DiskIterator findDisk( const string& disk );
+ DiskIterator findDiskId( const string& id );
+ DiskIterator findDiskPath( const string& path );
LvmVgIterator findLvmVg( const string& name );
EvmsCoIterator findEvmsCo( const string& name );
DmraidCoIterator findDmraidCo( const string& name );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/libstorage/src/StorageInterface.h new/yast2-storage-2.15.7/libstorage/src/StorageInterface.h
--- old/yast2-storage-2.15.6/libstorage/src/StorageInterface.h 2007-03-14 13:14:42.000000000 +0100
+++ new/yast2-storage-2.15.7/libstorage/src/StorageInterface.h 2007-03-21 18:00:08.000000000 +0100
@@ -174,6 +174,7 @@
unsigned maxLogical;
unsigned maxPrimary;
bool initDisk;
+ bool iscsi;
};
/**
@@ -385,6 +386,19 @@
};
/**
+ * Contains info about a DM volume.
+ */
+ struct ContVolInfo
+ {
+ ContVolInfo() {numeric=false; nr=0; type=CUNKNOWN;};
+ CType type;
+ string cname;
+ string vname;
+ bool numeric;
+ unsigned nr;
+ };
+
+ /**
* prelimiary list of error codes, must have negative values
*/
enum ErrorCodes
@@ -2016,6 +2030,17 @@
*/
virtual void dumpObjectList() = 0;
+ /**
+ * Split volume device name up into container name and a volume
+ * name. For Containers where this is appropriate (e.g. disks,
+ * MD, loop) also a volume number is provided.
+ *
+ * @param disk device name of volume, e.g. /dev/hda1
+ * @param info record that get filled with split data
+ * @return zero if all is ok, negative number to indicate an error
+ */
+ virtual int getContVolInfo( const string& dev, ContVolInfo& info) = 0;
+
};
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/libstorage/src/Volume.h new/yast2-storage-2.15.7/libstorage/src/Volume.h
--- old/yast2-storage-2.15.6/libstorage/src/Volume.h 2007-03-14 13:14:42.000000000 +0100
+++ new/yast2-storage-2.15.7/libstorage/src/Volume.h 2007-03-21 18:00:08.000000000 +0100
@@ -106,6 +106,7 @@
const string& name() const { return nm; }
unsigned long minorNr() const { return mnr; }
unsigned long majorNr() const { return mjr; }
+ bool isNumeric() const { return numeric; }
void setMajorMinor( unsigned long Major, unsigned long Minor )
{ mjr=Major; mnr=Minor; }
void setSize( unsigned long long SizeK ) { size_k=orig_size_k=SizeK; }
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/storage/src/include/do_proposal_flexible.ycp new/yast2-storage-2.15.7/storage/src/include/do_proposal_flexible.ycp
--- old/yast2-storage-2.15.6/storage/src/include/do_proposal_flexible.ycp 2007-02-28 10:54:14.000000000 +0100
+++ new/yast2-storage-2.15.7/storage/src/include/do_proposal_flexible.ycp 2007-03-20 12:48:45.000000000 +0100
@@ -14,7 +14,7 @@
*
*************************************************************
- $Id: do_proposal_flexible.ycp 36552 2007-02-28 09:54:12Z fehr $
+ $Id: do_proposal_flexible.ycp 37039 2007-03-20 11:48:41Z fehr $
*/
{
@@ -3733,7 +3733,7 @@
else
{
if( Storage::ProposalEvms() &&
- size(target["/dev/evms","partitions"]:[])==0 )
+ size(Storage::EvmsTrivialMaps(target))==0 )
{
Storage::ActivateEvms();
target = Storage::GetTargetMap();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/storage/src/inst_evms.ycp new/yast2-storage-2.15.7/storage/src/inst_evms.ycp
--- old/yast2-storage-2.15.6/storage/src/inst_evms.ycp 2006-10-12 18:13:33.000000000 +0200
+++ new/yast2-storage-2.15.7/storage/src/inst_evms.ycp 2007-03-20 12:48:45.000000000 +0100
@@ -12,7 +12,7 @@
*
*
*
- * $Id: inst_evms.ycp 33372 2006-10-12 16:13:30Z fehr $
+ * $Id: inst_evms.ycp 37039 2007-03-20 11:48:41Z fehr $
*
*/
@@ -38,11 +38,7 @@
Storage::CreateTargetBackup("evms");
- y2milestone( "evms:%1", targetMap["/dev/evms","partitions"]:[] );
- y2milestone( "evms co:%1", size(filter(string k, map e, targetMap,
- ``(e["is_container"]:false))));
-
- if( size(targetMap["/dev/evms","partitions"]:[])==0 )
+ if( size(Storage::EvmsTrivialMaps(targetMap))==0 )
{
Storage::ActivateEvms();
targetMap = Storage::GetTargetMap();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/storage/src/modules/FileSystems.ycp new/yast2-storage-2.15.7/storage/src/modules/FileSystems.ycp
--- old/yast2-storage-2.15.6/storage/src/modules/FileSystems.ycp 2007-02-19 14:09:40.000000000 +0100
+++ new/yast2-storage-2.15.7/storage/src/modules/FileSystems.ycp 2007-03-22 11:43:56.000000000 +0100
@@ -7,7 +7,7 @@
* These module contains the supported filesystems and their settings.
*
*
- * $Id: FileSystems.ycp 36260 2007-02-19 13:09:39Z fehr $
+ * $Id: FileSystems.ycp 37085 2007-03-22 10:43:51Z fehr $
*/
{
module "FileSystems";
@@ -24,6 +24,8 @@
import "LibStorage";
import "LibStorage::StorageInterface";
import "LibStorage::FsCapabilities";
+ import "LibStorage::DiskInfo";
+ import "LibStorage::ContVolInfo";
global map conv_fs =
$[ "def_sym" : `unknown,
@@ -62,6 +64,8 @@
global string nchars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+ any lib_id = nil;
+
define list FstabOptionStrings =
[ "defaults",
"auto", "noauto",
@@ -885,6 +889,7 @@
{
boolean bval = false;
integer val = 0;
+ lib_id = sint;
foreach( symbol fs, map cap, capabilities,
``{
if( fs != `unknown )
@@ -1336,7 +1341,28 @@
fst_default = "ro," + fst_default;
}
}
- y2milestone( "DefaultFstabOptions fsys %1 is %2", fsys, fst_default );
+ any dp = LibStorage::ContVolInfo::new("LibStorage::ContVolInfo");
+ string dev = part["device"]:"";
+ LibStorage::StorageInterface::getContVolInfo( lib_id, dev, dp );
+ integer t = LibStorage::ContVolInfo::swig_type_get(dp);
+ if( t == LibStorage::DISK() )
+ {
+ any infos = LibStorage::DiskInfo::new("LibStorage::DiskInfo");
+ string disk = LibStorage::ContVolInfo::swig_cname_get(dp);
+ y2milestone( "DefaultFstabOptions disk:%1", disk );
+ integer r = LibStorage::StorageInterface::getDiskInfo( lib_id, disk,
+ infos );
+ if( r==0 )
+ {
+ if(LibStorage::DiskInfo::swig_iscsi_get(infos))
+ {
+ if( size(fst_default)>0 )
+ fst_default = fst_default + ",";
+ fst_default = fst_default + "hotplug";
+ }
+ }
+ }
+ y2milestone( "DefaultFstabOptions dev %3 fsys %1 is %2", fsys, fst_default, dev );
return( fst_default );
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/storage/src/modules/Storage.ycp new/yast2-storage-2.15.7/storage/src/modules/Storage.ycp
--- old/yast2-storage-2.15.6/storage/src/modules/Storage.ycp 2007-03-14 13:15:10.000000000 +0100
+++ new/yast2-storage-2.15.7/storage/src/modules/Storage.ycp 2007-03-27 11:58:51.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 36953 2007-03-14 12:15:04Z fehr $
+ * $Id: Storage.ycp 37135 2007-03-27 09:58:47Z fehr $
*/
{
@@ -1140,7 +1140,12 @@
d["label"] = LibStorage::DiskInfo::swig_disklabel_get(dinfo);
d["max_logical"] = LibStorage::DiskInfo::swig_maxLogical_get(dinfo);
d["max_primary"] = LibStorage::DiskInfo::swig_maxPrimary_get(dinfo);
- boolean bt = LibStorage::DiskInfo::swig_initDisk_get(dinfo);
+ boolean bt = LibStorage::DiskInfo::swig_iscsi_get(dinfo);
+ if( bt )
+ d["iscsi"] = true;
+ else if( haskey( d, "iscsi" ))
+ d = remove( d, "iscsi" );
+ bt = LibStorage::DiskInfo::swig_initDisk_get(dinfo);
if( bt )
d["dasdfmt"] = true;
else if( haskey( d, "dasdfmt" ))
@@ -2684,6 +2689,16 @@
return( ret==0 );
}
+global list EvmsTrivialMaps( map tgMap )
+ {
+ string regex1 = "[0-9]+$";
+ y2milestone( "EvmsTrivialMaps %1", tgMap["/dev/evms","partitions"]:[] );
+ list ps = filter( map p, tgMap["/dev/evms","partitions"]:[],
+ ``(size(regexppos(p["name"]:"",regex1))>0));
+ y2milestone( "EvmsTrivialMaps %1", ps );
+ return( ps );
+ }
+
global boolean CreateEvmsCo( string name, integer pesize, boolean lvm2 )
{
y2milestone( "CreateEvmsCo name:%1 pesize:%2 lvm2:%3", name, pesize, lvm2 );
@@ -3727,12 +3742,13 @@
value );
map tmp = GetDiskPartitionTg( device, tg );
string disk = tmp["disk"]:"";
+ string dev = GetDeviceName( tmp["disk"]:"", tmp["nr"]:(any)0 );
list r_part = filter(map part, tg[disk,"partitions"]:[],
- ``(part["device"]:"" != device ));
+ ``(part["device"]:"" != dev ));
if( size(r_part)!=size(tg[disk,"partitions"]:[]) )
{
map p = filter( map part, tg[disk,"partitions"]:[],
- ``(part["device"]:"" == device ))[0]:$[];
+ ``(part["device"]:"" == dev ))[0]:$[];
if( size(p)>0 )
{
p[key] = value;
@@ -3750,12 +3766,13 @@
y2debug( "device=%1, key=%2", device, key );
map tmp = GetDiskPartitionTg( device, tg );
string disk = tmp["disk"]:"";
+ string dev = GetDeviceName( tmp["disk"]:"", tmp["nr"]:(any)0 );
list r_part = filter(map part, tg[disk,"partitions"]:[],
- ``(part["device"]:"" != device ));
+ ``(part["device"]:"" != dev ));
if( size(r_part)!=size(tg[disk,"partitions"]:[]) )
{
map p = filter( map part, tg[disk,"partitions"]:[],
- ``(part["device"]:"" == device ))[0]:$[];
+ ``(part["device"]:"" == dev ))[0]:$[];
if( size(p)>0 )
{
p = filter(string k, any e, (map)p, ``(k != key) );
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/yast2-storage-2.15.6/VERSION new/yast2-storage-2.15.7/VERSION
--- old/yast2-storage-2.15.6/VERSION 2007-03-15 18:43:47.000000000 +0100
+++ new/yast2-storage-2.15.7/VERSION 2007-03-27 11:58:32.000000000 +0200
@@ -1 +1 @@
-2.15.6
+2.15.7
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org