Author: aschnell Date: Fri Aug 29 16:19:46 2008 New Revision: 50489 URL: http://svn.opensuse.org/viewcvs/yast?rev=50489&view=rev Log: - make getAllUsedFs return a list of strings instead of a single string Modified: trunk/storage/libstorage/src/Storage.cc trunk/storage/libstorage/src/Storage.h trunk/storage/libstorage/src/StorageInterface.h 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... ============================================================================== --- trunk/storage/libstorage/src/Storage.cc (original) +++ trunk/storage/libstorage/src/Storage.cc Fri Aug 29 16:19:46 2008 @@ -4348,25 +4348,23 @@ } -string Storage::getAllUsedFs() const +list<string> Storage::getAllUsedFs() const { set<FsType> fs; ConstVolPair p = volPair( Volume::notDeleted ); for( ConstVolIterator v=p.begin(); v!=p.end(); ++v ) - { + { FsType t = v->getFs(); if (t!=FSUNKNOWN && t!=FSNONE) fs.insert(t); - } - string ret; + } + list<string> ret; for( set<FsType>::const_iterator i=fs.begin(); i!=fs.end(); ++i ) - { - if( !ret.empty() ) - ret += ' '; - ret += Volume::fsTypeString(*i); - } + { + ret.push_back(Volume::fsTypeString(*i)); + } y2mil( "ret:" << ret ); - return( ret ); + return ret; } Modified: trunk/storage/libstorage/src/Storage.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?... ============================================================================== --- trunk/storage/libstorage/src/Storage.h (original) +++ trunk/storage/libstorage/src/Storage.h Fri Aug 29 16:19:46 2008 @@ -293,7 +293,7 @@ bool getFsCapabilities( storage::FsType fstype, storage::FsCapabilities& fscapabilities) const; - string getAllUsedFs() const; + list<string> getAllUsedFs() const; void setExtError( const string& txt ); int createPartition( const string& disk, storage::PartitionType type, unsigned long start, unsigned long size, Modified: trunk/storage/libstorage/src/StorageInterface.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageInt... ============================================================================== --- trunk/storage/libstorage/src/StorageInterface.h (original) +++ trunk/storage/libstorage/src/StorageInterface.h Fri Aug 29 16:19:46 2008 @@ -861,9 +861,8 @@ /** * Get list of filesystem types present on any block devices. - * List elements are separated by blanks. */ - virtual string getAllUsedFs() const = 0; + virtual list<string> getAllUsedFs() const = 0; /** * Print all detected entities to a stream. Modified: trunk/storage/storage/src/modules/Storage.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/storage/src/modules/Stora... ============================================================================== --- trunk/storage/storage/src/modules/Storage.ycp (original) +++ trunk/storage/storage/src/modules/Storage.ycp Fri Aug 29 16:19:46 2008 @@ -6387,12 +6387,12 @@ } -global string GetUsedFs() +global list<string> GetUsedFs() { if (!InitLibstorage(false)) return nil; - string r = LibStorage::StorageInterface::getAllUsedFs(sint); + list<string> r = LibStorage::StorageInterface::getAllUsedFs(sint); y2milestone("GetUsedFs ret:%1", r); return r; } @@ -6401,7 +6401,7 @@ global void SaveUsedFs() { y2milestone("SaveUsedFs"); - SCR::Write(.sysconfig.storage.USED_FS_LIST, GetUsedFs()); + SCR::Write(.sysconfig.storage.USED_FS_LIST, mergestring(GetUsedFs(), " ")); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org