Author: aschnell Date: Mon Jul 28 14:10:17 2008 New Revision: 49453 URL: http://svn.opensuse.org/viewcvs/yast?rev=49453&view=rev Log: - cleanup Modified: trunk/storage/libstorage/src/Dm.cc trunk/storage/libstorage/src/DmPartCo.cc trunk/storage/libstorage/src/Storage.cc Modified: trunk/storage/libstorage/src/Dm.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dm.cc?rev=49453&r1=49452&r2=49453&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dm.cc (original) +++ trunk/storage/libstorage/src/Dm.cc Mon Jul 28 14:10:17 2008 @@ -54,7 +54,7 @@ { if( dm_major==0 ) getDmMajor(); - SystemCmd c( "dmsetup table \"" + tname + "\"" ); + SystemCmd c("dmsetup table " + quote(tname)); inactiv = c.retcode()!=0; y2milestone( "table %s retcode:%d numLines:%u inactive:%d", tname.c_str(), c.retcode(), c.numLines(), inactiv ); @@ -207,7 +207,7 @@ } else { - c.execute( "dmsetup table \"" + *c.getLine(0) + "\"" ); + c.execute("dmsetup table " + quote(*c.getLine(0))); if( c.retcode()==0 && c.numLines()>0 ) { pair = extractNthWord( 3, *c.getLine(0) ); @@ -489,7 +489,7 @@ int Dm::dmNumber( const string& table ) { int ret = -1; - SystemCmd c( "dmsetup -c --noheadings info \"" + table + "\"" ); + SystemCmd c("dmsetup -c --noheadings info " + quote(table)); if( c.retcode()==0 && c.numLines()>0 ) { list<string> sl = splitString( *c.getLine(0), ":" ); Modified: trunk/storage/libstorage/src/DmPartCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPartCo.cc?rev=49453&r1=49452&r2=49453&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmPartCo.cc (original) +++ trunk/storage/libstorage/src/DmPartCo.cc Mon Jul 28 14:10:17 2008 @@ -232,7 +232,7 @@ void DmPartCo::init( ProcPart& ppart ) { - SystemCmd c( "dmsetup table \"" + nm + "\"" ); + SystemCmd c("dmsetup table " + quote(nm)); if( c.retcode()==0 && c.numLines()>=1 && isdigit( c.stdout()[0] )) { mnr = Dm::dmNumber( nm ); Modified: trunk/storage/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=49453&r1=49452&r2=49453&view=diff ============================================================================== --- trunk/storage/libstorage/src/Storage.cc (original) +++ trunk/storage/libstorage/src/Storage.cc Mon Jul 28 14:10:17 2008 @@ -4415,7 +4415,7 @@ } tfile.close(); c.execute( "cat " + fname ); - c.execute( "dmsetup create " + tblname + " <" + fname ); + c.execute("dmsetup create " + quote(tblname) + " <" + fname); unlink( fname.c_str() ); } EvmsCo::activateDevices(); @@ -5282,15 +5282,15 @@ bool Storage::removeDmTable( const string& table ) { - SystemCmd c( "dmsetup table \"" + table + "\"" ); + SystemCmd c("dmsetup table " + quote(table)); bool ret = false; if( c.retcode()==0 ) { - c.execute( "dmsetup info \"" + table + "\"" ); - c.execute( "dmsetup remove \"" + table + "\"" ); + c.execute("dmsetup info " + quote(table)); + c.execute("dmsetup remove " + quote(table)); waitForDevice(); ret = c.retcode()==0; - c.execute( "dmsetup table | grep \"" + table + "\"" ); + c.execute("dmsetup table | grep " + quote(table)); logProcData(); } y2milestone( "ret:%d", ret ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org