Author: aschnell Date: Wed Nov 12 18:42:06 2008 New Revision: 53242 URL: http://svn.opensuse.org/viewcvs/yast?rev=53242&view=rev Log: - fixed defaultMountBy and allowedMountBy for NFS (bnc #444268) Modified: trunk/storage/libstorage/src/Volume.cc trunk/storage/package/yast2-storage.changes Modified: trunk/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=53242&r1=53241&r2=53242&view=diff ============================================================================== --- trunk/storage/libstorage/src/Volume.cc (original) +++ trunk/storage/libstorage/src/Volume.cc Wed Nov 12 18:42:06 2008 @@ -104,12 +104,16 @@ return( is_loop?loop_dev:dev ); } -storage::MountByType Volume::defaultMountBy( const string& mp ) - { + +storage::MountByType +Volume::defaultMountBy(const string& mp) +{ MountByType mb = cont->getStorage()->getDefaultMountBy(); y2mil( "mby:" << mb_names[mb] << " type:" << cType() ); if( cType()!=DISK && (mb==MOUNTBY_ID || mb==MOUNTBY_PATH) ) mb = MOUNTBY_DEVICE; + if (cType() == NFSC && mb != MOUNTBY_DEVICE) + mb = MOUNTBY_DEVICE; if( mp=="swap" && mb==MOUNTBY_UUID ) mb = MOUNTBY_DEVICE; y2mil( "path:" << udevPath() << " id:" << udevId() ); @@ -120,15 +124,19 @@ (mb==MOUNTBY_UUID || mb==MOUNTBY_LABEL) ) mb = MOUNTBY_DEVICE; y2mil( "dev:" << dev << " mp:" << mp << " mby:" << mb_names[mb] ); - return( mb ); - } + return mb; +} -bool Volume::allowedMountBy( storage::MountByType mby, const string& mp ) - { + +bool +Volume::allowedMountBy(storage::MountByType mby, const string& mp) +{ bool ret = true; if( (cType()!=DISK && (mby==MOUNTBY_ID || mby==MOUNTBY_PATH)) || (mp=="swap" && mby==MOUNTBY_UUID ) ) ret = false; + if (cType() == NFSC && mby != MOUNTBY_DEVICE) + ret = false; if( (mby==MOUNTBY_PATH && udevPath().empty()) || (mby==MOUNTBY_ID && udevId().empty()) ) ret = false; @@ -136,8 +144,9 @@ (mby==MOUNTBY_UUID || mby==MOUNTBY_LABEL) ) ret = false; y2mil( "mby:" << mb_names[mby] << " mp:" << mp << " ret:" << ret ); - return( ret ); - } + return ret; +} + void Volume::init() { Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=53242&r1=53241&r2=53242&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Wed Nov 12 18:42:06 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Nov 12 17:31:56 GMT 2008 - aschnell@suse.de + +- fixed defaultMountBy and allowedMountBy for NFS (bnc #444268) + +------------------------------------------------------------------- Wed Nov 12 14:25:00 GMT 2008 - aschnell@suse.de - avoid warning about missing /boot partition on certain PPC -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org