[yast-commit] r60522 - in /branches/SuSE-Code-11-SP1-Branch/storage: libstorage/src/Storage.cc package/yast2-storage.changes
Author: aschnell Date: Mon Jan 25 17:32:59 2010 New Revision: 60522 URL: http://svn.opensuse.org/viewcvs/yast?rev=60522&view=rev Log: - fixed default mount-by for multipath (bnc #572209) Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Storage.cc branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes Modified: branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Storage.cc?rev=60522&r1=60521&r2=60522&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Storage.cc (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/libstorage/src/Storage.cc Mon Jan 25 17:32:59 2010 @@ -2523,11 +2523,33 @@ mby = defaultMountBy; pair<string,unsigned> dp = Disk::getDiskPartition(device); y2mil( "dp:" << dp ); - DiskIterator i = findDisk( dp.first ); - if( (i==dEnd()) || (mby == MOUNTBY_ID && i->udevId().empty()) || - (mby == MOUNTBY_PATH && i->udevPath().empty())) - mby = MOUNTBY_DEVICE; - ret = STORAGE_VOLUME_NOT_FOUND; + + DiskIterator i1 = findDisk(dp.first); + DmPartCoIterator i2 = findDmPartCo(dp.first); + MdPartCoIterator i3 = findMdPartCo(dp.first); + + if (i1 != dEnd()) + { + if ((mby == MOUNTBY_ID && i1->udevId().empty()) || + (mby == MOUNTBY_PATH && i1->udevPath().empty())) + mby = MOUNTBY_DEVICE; + } + else if (i2 != dmpCoEnd()) + { + if ((mby == MOUNTBY_ID && i2->udevId().empty()) || + (mby == MOUNTBY_PATH && i2->udevPath().empty())) + mby = MOUNTBY_DEVICE; + } + else if (i3 != mdpCoEnd()) + { + if ((mby == MOUNTBY_ID && i3->udevId().empty()) || + (mby == MOUNTBY_PATH && i3->udevPath().empty())) + mby = MOUNTBY_DEVICE; + } + else + { + ret = STORAGE_VOLUME_NOT_FOUND; + } } y2milestone( "ret:%d mby:%s", ret, Volume::mbyTypeString(mby).c_str()); return( ret ); Modified: branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes?rev=60522&r1=60521&r2=60522&view=diff ============================================================================== --- branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes (original) +++ branches/SuSE-Code-11-SP1-Branch/storage/package/yast2-storage.changes Mon Jan 25 17:32:59 2010 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Mon Jan 25 17:30:26 CET 2010 - aschnell@suse.de + +- fixed default mount-by for multipath (bnc #572209) + +------------------------------------------------------------------- Mon Jan 25 14:12:51 CET 2010 - aschnell@suse.de - fixed generation of device names in proposal for partitionable -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
aschnell@svn.opensuse.org