Author: aschnell Date: Fri Nov 14 14:00:30 2008 New Revision: 53315 URL: http://svn.opensuse.org/viewcvs/yast?rev=53315&view=rev Log: - keep label and uuid while resizing swap (bnc #445051) - use absolute path for some programs 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=53315&r1=53314&r2=53315&view=diff ============================================================================== --- trunk/storage/libstorage/src/Volume.cc (original) +++ trunk/storage/libstorage/src/Volume.cc Fri Nov 14 14:00:30 2008 @@ -687,7 +687,7 @@ static int fcount=1000; int ret = 0; bool needMount = false; - y2milestone( "device:%s", dev.c_str() ); + y2mil("device:" << dev); if( !silent() ) { cont->getStorage()->showInfoCb( formatText(true) ); @@ -1202,13 +1202,18 @@ switch( fs ) { case SWAP: - cmd = "/sbin/mkswap " + quote(mountDevice()); - c.execute( cmd ); + cmd = "/sbin/mkswap"; + if (!label.empty()) + cmd += " -L " + quote(label); + if (!uuid.empty()) + cmd += " -U " + quote(uuid); + cmd += " " + quote(mountDevice()); + c.execute(cmd); if( c.retcode()!=0 ) ret = VOLUME_RESIZE_FAILED; break; case REISERFS: - cmd = "resize_reiserfs -f "; + cmd = "/sbin/resize_reiserfs -f "; if( needShrink() ) { cmd = "echo y | " + cmd; @@ -1223,7 +1228,7 @@ } break; case NTFS: - cmd = "echo y | ntfsresize -f "; + cmd = "echo y | /usr/sbin/ntfsresize -f "; if( needShrink() ) cmd += "-s " + decString(size_k) + "k "; cmd += quote(mountDevice()); @@ -1238,7 +1243,7 @@ break; case EXT2: case EXT3: - cmd = "resize2fs -f " + quote(mountDevice()); + cmd = "/sbin/resize2fs -f " + quote(mountDevice()); if( needShrink() ) cmd += " " + decString(size_k) + "K"; c.execute( cmd ); @@ -1264,7 +1269,7 @@ } if( ret==0 ) { - cmd = "xfs_growfs " + quote(mpoint); + cmd = "/sbin/xfs_growfs " + quote(mpoint); c.execute( cmd ); if( c.retcode()!=0 ) { @@ -1992,8 +1997,7 @@ int ret = 0; bool remount = false; FsCapabilities caps; - y2milestone( "device:%s mp:%s label:%s", dev.c_str(), mp.c_str(), - label.c_str() ); + y2mil("device:" << dev << " mp:" << mp << " label:" << label); if( !silent() ) { cont->getStorage()->showInfoCb( labelText(true) ); @@ -2039,7 +2043,10 @@ } break; case SWAP: - cmd = "/sbin/mkswap -L " + quote(label) + " " + quote(mountDevice()); + cmd = "/sbin/mkswap -L " + quote(label); + if (!uuid.empty()) + cmd += " -U " + quote(uuid); + cmd += " " + quote(mountDevice()); break; default: ret = VOLUME_MKLABEL_FS_UNABLE; Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=53315&r1=53314&r2=53315&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Fri Nov 14 14:00:30 2008 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri Nov 14 13:57:58 CET 2008 - aschnell@suse.de + +- keep label and uuid while resizing swap (bnc #445051) + +------------------------------------------------------------------- Wed Nov 12 17:31:56 GMT 2008 - aschnell@suse.de - fixed defaultMountBy and allowedMountBy for NFS (bnc #444268) -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org