[yast-commit] r64181 - in /branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src: Btrfs.cc Volume.cc Volume.h
Author: fehr Date: Tue May 31 19:36:37 2011 New Revision: 64181 URL: http://svn.opensuse.org/viewcvs/yast?rev=64181&view=rev Log: remove tmpdir after umount Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.h Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc?rev=64181&r1=64180&r2=64181&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Btrfs.cc Tue May 31 19:36:37 2011 @@ -285,7 +285,7 @@ ++d; } if( needUmount ) - ret = umountTmpMount( ret ); + ret = umountTmpMount( m, ret ); y2mil( "this:" << *this ); y2mil("ret:" << ret); return( ret ); @@ -316,7 +316,7 @@ ++d; } if( needUmount ) - ret = umountTmpMount( ret ); + ret = umountTmpMount( m, ret ); y2mil( "this:" << *this ); y2mil("ret:" << ret); return( ret ); @@ -346,7 +346,7 @@ } } if( needUmount ) - ret = umountTmpMount( ret ); + ret = umountTmpMount( m, ret ); y2mil( "ret:" << ret ); return( ret ); } @@ -384,7 +384,7 @@ } } if( needUmount ) - ret = umountTmpMount( ret ); + ret = umountTmpMount( m, ret ); y2mil( "ret:" << ret ); return( ret ); } Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc?rev=64181&r1=64180&r2=64181&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.cc Tue May 31 19:36:37 2011 @@ -723,11 +723,13 @@ return( ret ); } -int Volume::umountTmpMount( int ret ) +int Volume::umountTmpMount( const string& m, int ret ) { int r = ret; if( !getStorage()->umountDev( mountDevice() ) && r==0 ) r = VOLUME_CANNOT_TMP_UMOUNT; + if( m.substr( 0, 16 )== "/tmp/libstorage-" ) + rmdir( m.c_str() ); return( r ); } @@ -853,7 +855,7 @@ } } if( needUmount ) - ret = umountTmpMount( ret ); + ret = umountTmpMount( m, ret ); } } y2mil( "ret:" << ret ); Modified: branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.h URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.h?rev=64181&r1=64180&r2=64181&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.h (original) +++ branches/SuSE-Code-11-SP2-Branch/storage/libstorage/src/Volume.h Tue May 31 19:36:37 2011 @@ -235,7 +235,7 @@ bool format ) const; bool noFreqPassno() const; int prepareTmpMount( string& m, bool& needUmount ); - int umountTmpMount( int ret ); + int umountTmpMount( const string& m, int ret ); int doFormatBtrfs(); string getLosetupCmd( storage::EncryptType, const string& pwdfile ) const; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
fehr@svn2.opensuse.org