Author: aschnell Date: Thu May 14 15:31:19 2009 New Revision: 57181 URL: http://svn.opensuse.org/viewcvs/yast?rev=57181&view=rev Log: - changed StorageInterface::checkDeviceMounted() to return list of all known moint points Modified: trunk/storage/libstorage/src/Storage.cc trunk/storage/libstorage/src/Storage.h trunk/storage/libstorage/src/StorageInterface.h trunk/storage/package/yast2-storage.changes trunk/storage/storage/src/modules/Storage.ycp Modified: trunk/storage/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=57181&r1=57180&r2=57181&view=diff ============================================================================== --- trunk/storage/libstorage/src/Storage.cc (original) +++ trunk/storage/libstorage/src/Storage.cc Thu May 14 15:31:19 2009 @@ -5236,7 +5236,7 @@ } bool -Storage::checkDeviceMounted( const string& device, string& mp ) +Storage::checkDeviceMounted(const string& device, list<string>& mps) { bool ret = false; assertInit(); @@ -5245,17 +5245,16 @@ ProcMounts mountData( this ); if( findVolume( device, vol ) ) { - mp = mountData.getMount( vol->mountDevice() ); - if( mp.empty() ) - mp = mountData.getMount( vol->altNames() ); + mps = mountData.getAllMounts(vol->mountDevice()); + mps.splice(mps.end(), mountData.getAllMounts(vol->altNames())); } else { - mp = mountData.getMount( device ); + mps = mountData.getAllMounts(device); } - ret = !mp.empty(); - y2mil("ret:" << ret << " mp:" << mp); - return( ret ); + ret = !mps.empty(); + y2mil("ret:" << ret << " mps:" << mps); + return ret; } bool Modified: trunk/storage/libstorage/src/Storage.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?rev=57181&r1=57180&r2=57181&view=diff ============================================================================== --- trunk/storage/libstorage/src/Storage.h (original) +++ trunk/storage/libstorage/src/Storage.h Thu May 14 15:31:19 2009 @@ -364,7 +364,7 @@ string getRootPrefix() const { return rootprefix; } int removeVolume( const string& device ); int removeUsing( const string& device, const storage::usedBy& uby ); - bool checkDeviceMounted( const string& device, string& mp ); + bool checkDeviceMounted(const string& device, list<string>& mps); bool umountDevice( const string& device ); bool mountDev( const string& device, const string& mp, bool ro=true, const string& opts="" ); Modified: trunk/storage/libstorage/src/StorageInterface.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageInterface.h?rev=57181&r1=57180&r2=57181&view=diff ============================================================================== --- trunk/storage/libstorage/src/StorageInterface.h (original) +++ trunk/storage/libstorage/src/StorageInterface.h Thu May 14 15:31:19 2009 @@ -1974,10 +1974,10 @@ * Determine if the given device is known and mounted somewhere * * @param device device name to check (checks also all alias names) - * @param mp set to current mount point if mounted + * @param mps set to current mount points if mounted * @return bool that is true if device is mounted */ - virtual bool checkDeviceMounted( const string& device, string& mp ) = 0; + virtual bool checkDeviceMounted(const string& device, list<string>& mps) = 0; /** * Umount the given device and do what is necessary to remove Modified: trunk/storage/package/yast2-storage.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/package/yast2-storage.changes?rev=57181&r1=57180&r2=57181&view=diff ============================================================================== --- trunk/storage/package/yast2-storage.changes (original) +++ trunk/storage/package/yast2-storage.changes Thu May 14 15:31:19 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu May 14 15:20:51 CEST 2009 - aschnell@suse.de + +- changed StorageInterface::checkDeviceMounted() to return list of + all known moint points + +------------------------------------------------------------------- Tue May 12 10:35:24 CEST 2009 - aschnell@suse.de - fixed mount options with quota enabled for non-journaling Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Storage.ycp?rev=57181&r1=57180&r2=57181&view=diff ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Thu May 14 15:31:19 2009 @@ -3471,11 +3471,11 @@ global string DeviceMounted( string dev ) { - string ret = ""; + list<string> ret = []; LibStorage::StorageInterface::checkDeviceMounted( sint, dev, ret ); - if( size(ret)>0 ) - y2milestone( "DeviceMounted %1 at %2", dev, ret ); - return( ret ); + if (!isempty(ret)) + y2milestone("DeviceMounted %1 at %2", dev, ret[0]:""); + return ret[0]:""; } /** -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org