Author: aschnell
Date: Tue Mar 3 17:49:00 2009
New Revision: 55906
URL: http://svn.opensuse.org/viewcvs/yast?rev=55906&view=rev
Log:
- replace mergeString by boost::join
Modified:
trunk/storage/libstorage/src/AppUtil.cc
trunk/storage/libstorage/src/AppUtil.h
trunk/storage/libstorage/src/Dasd.cc
trunk/storage/libstorage/src/Disk.cc
trunk/storage/libstorage/src/EtcFstab.cc
trunk/storage/libstorage/src/EtcFstab.h
trunk/storage/libstorage/src/NfsCo.cc
trunk/storage/libstorage/src/Partition.cc
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/Volume.cc
Modified: trunk/storage/libstorage/src/AppUtil.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.cc (original)
+++ trunk/storage/libstorage/src/AppUtil.cc Tue Mar 3 17:49:00 2009
@@ -214,13 +214,6 @@
}
-string
-mergeString(const list<string>& l, const string& del)
-{
- return boost::join(l, del);
-}
-
-
map
makeMap( const list<string>& l, const string& delim, const string& removeSur )
{
Modified: trunk/storage/libstorage/src/AppUtil.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.h?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.h (original)
+++ trunk/storage/libstorage/src/AppUtil.h Tue Mar 3 17:49:00 2009
@@ -31,7 +31,6 @@
std::list<string> splitString( const string& s, const string& delChars=" \t\n",
bool multipleDelim=true, bool skipEmpty=true,
const string& quotes="" );
-string mergeString( const std::list<string>& l, const string& del=" " );
std::map makeMap( const std::list<string>& l,
const string& delim = "=",
const string& removeSur = " \t\n" );
Modified: trunk/storage/libstorage/src/Dasd.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dasd.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Dasd.cc (original)
+++ trunk/storage/libstorage/src/Dasd.cc Tue Mar 3 17:49:00 2009
@@ -543,7 +543,7 @@
y2mil("devs:" << devs);
if( !silent )
{
- string txt = dasdfmtTexts( dl.size()==1, mergeString(devs) );
+ string txt = dasdfmtTexts( dl.size()==1, boost::join(devs, " ") );
getStorage()->showInfoCb( txt );
}
for( list<string>::iterator i = devs.begin(); i!=devs.end(); ++i )
@@ -551,7 +551,7 @@
normalizeDevice(*i);
*i = "-f " + quote(*i);
}
- string cmd_line = DASDFMTBIN " -Y -P 4 -b 4096 -y -m 1 -d cdl " + mergeString(devs);
+ string cmd_line = DASDFMTBIN " -Y -P 4 -b 4096 -y -m 1 -d cdl " + boost::join(devs, " ");
y2mil("cmdline:" << cmd_line);
CallbackProgressBar cb = getStorage()->getCallbackProgressBarTheOne();
ScrollBarHandler* sb = new DasdfmtScrollbar( cb );
Modified: trunk/storage/libstorage/src/Disk.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Disk.cc (original)
+++ trunk/storage/libstorage/src/Disk.cc Tue Mar 3 17:49:00 2009
@@ -2609,7 +2609,7 @@
info.initDisk = init_disk;
info.iscsi = iscsi;
info.udevPath = udev_path;
- info.udevId = mergeString( udev_id );
+ info.udevId = boost::join(udev_id, " ");
tinfo = info;
}
Modified: trunk/storage/libstorage/src/EtcFstab.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/EtcFstab.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/EtcFstab.cc (original)
+++ trunk/storage/libstorage/src/EtcFstab.cc Tue Mar 3 17:49:00 2009
@@ -490,7 +490,7 @@
{
ls.push_back( Volume::encTypeString(e.encr) );
}
- ls.push_back( mergeString( e.opts, "," ) );
+ ls.push_back( boost::join( e.opts, "," ) );
if( (e.dmcrypt&&e.mount!="swap") &&
find( e.opts.begin(), e.opts.end(), "noauto" )==e.opts.end() )
{
@@ -563,7 +563,7 @@
tls.push_back("tmp");
else if( !need_tmp && (i=find( tls.begin(), tls.end(), "tmp" ))!=tls.end() )
tls.erase(i);
- tmp = mergeString( tls, "," );
+ tmp = boost::join( tls, "," );
ls.push_back( tmp.empty()?"none":tmp );
}
Modified: trunk/storage/libstorage/src/EtcFstab.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/EtcFstab.h?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/EtcFstab.h (original)
+++ trunk/storage/libstorage/src/EtcFstab.h Tue Mar 3 17:49:00 2009
@@ -4,6 +4,7 @@
#include <string>
#include <list>
#include <map>
+#include
#include "y2storage/StorageInterface.h"
@@ -47,7 +48,7 @@
{
s << "device:" << v.device
<< " dentry:" << v.dentry << " mount:" << v.mount
- << " fs:" << v.fs << " opts:" << mergeString( v.opts, "," )
+ << " fs:" << v.fs << " opts:" << boost::join( v.opts, "," )
<< " freq:" << v.freq << " passno:" << v.passno;
if( v.noauto )
s << " noauto";
@@ -113,7 +114,7 @@
{
s << "device:" << v.device
<< " dentry:" << v.dentry << " mount:" << v.mount
- << " fs:" << v.fs << " opts:" << mergeString( v.opts, "," )
+ << " fs:" << v.fs << " opts:" << boost::join( v.opts, "," )
<< " freq:" << v.freq << " passno:" << v.passno;
if( !v.loop_dev.empty() )
s << " loop_dev:" << v.loop_dev;
Modified: trunk/storage/libstorage/src/NfsCo.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/NfsCo.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/NfsCo.cc (original)
+++ trunk/storage/libstorage/src/NfsCo.cc Tue Mar 3 17:49:00 2009
@@ -133,7 +133,7 @@
{
Nfs *n = new Nfs( *this, i->device );
n->setMount( i->mount );
- string op = mergeString(i->opts, "," );
+ string op = boost::join(i->opts, "," );
if( op != "defaults" )
n->setFstabOption( op );
addToList( n );
@@ -177,7 +177,7 @@
}
}
n->setIgnoreFstab();
- n->setFstabOption( mergeString(i->opts, "," ) );
+ n->setFstabOption( boost::join(i->opts, "," ) );
addToList( n );
}
unsigned long long sz = getStorage()->getDfSize( i->mount );
Modified: trunk/storage/libstorage/src/Partition.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Partition.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Partition.cc (original)
+++ trunk/storage/libstorage/src/Partition.cc Tue Mar 3 17:49:00 2009
@@ -571,7 +571,7 @@
list<string> l = udevId();
for( list<string>::iterator i=l.begin(); i!=l.end(); ++i )
i->erase( 0, i->find_last_of('/')+1 );
- tinfo.udevId = mergeString( l );
+ tinfo.udevId = boost::join(l, " ");
}
void
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Tue Mar 3 17:49:00 2009
@@ -2180,7 +2180,7 @@
if( find( opts.begin(), opts.end(), *i )==opts.end() )
opts.push_back( *i );
}
- ret = vol->changeFstabOptions( mergeString( opts, "," ) );
+ ret = vol->changeFstabOptions( boost::join( opts, "," ) );
}
else
{
@@ -2214,7 +2214,7 @@
{
opts.remove_if(match_regex(*i));
}
- ret = vol->changeFstabOptions( mergeString( opts, "," ) );
+ ret = vol->changeFstabOptions( boost::join( opts, "," ) );
}
else
{
@@ -5309,7 +5309,7 @@
info->mount = i->mount;
info->mount_by = MOUNTBY_DEVICE;
info->fs = Volume::toFsType( i->fs );
- info->fstab_options = mergeString( i->opts, "," );
+ info->fstab_options = boost::join( i->opts, "," );
vil.push_back( *info );
}
else if( findVolume( i->dentry, vol ) )
Modified: trunk/storage/libstorage/src/Volume.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=55906&r1=55905&r2=55906&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Volume.cc (original)
+++ trunk/storage/libstorage/src/Volume.cc Tue Mar 3 17:49:00 2009
@@ -271,7 +271,7 @@
{
b << " mountby:" << mb_names[mount_by];
}
- fstab_opt = orig_fstab_opt = mergeString( entry.opts, "," );
+ fstab_opt = orig_fstab_opt = boost::join( entry.opts, "," );
b << " fstopt:" << fstab_opt;
if( !is_loop && entry.loop )
{
@@ -608,7 +608,7 @@
{
list<string> l;
getFstabOpts( l );
- fstab_opt = mergeString( l, "," );
+ fstab_opt = boost::join( l, "," );
}
int Volume::changeFstabOptions( const string& options )
@@ -1788,7 +1788,7 @@
i = find_if( l.begin(), l.end(), find_begin( "loop=" ) );
if( i!=l.end() )
*i = "loop=" + fstab_loop_dev;
- fstab_opt = mergeString( l, "," );
+ fstab_opt = boost::join( l, "," );
}
}
}
@@ -2142,7 +2142,7 @@
if( !l.empty() )
{
opts += "-o";
- opts += mergeString( l, "," );
+ opts += boost::join( l, "," );
opts += " ";
}
cmdline += "-t " + fsn + opts + quote(mountDevice()) + " " + quote(lmount);
@@ -2725,7 +2725,7 @@
{
info.mount = fste.mount;
info.mount_by = fste.mount_by;
- info.fstab_options = mergeString( fste.opts, "," );
+ info.fstab_options = boost::join( fste.opts, "," );
info.encryption = fste.encr;
tinfo = info;
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org