Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49743 - /trunk/storage/libstorage/src/Volume.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2008 23:42:48 -0000
  • Message-id: <20080805234249.2A4F039D23@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Aug 6 01:42:48 2008
New Revision: 49743

URL: http://svn.opensuse.org/viewcvs/yast?rev=49743&view=rev
Log:
- shell quoting

Modified:
trunk/storage/libstorage/src/Volume.cc

Modified: trunk/storage/libstorage/src/Volume.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=49743&r1=49742&r2=49743&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Volume.cc (original)
+++ trunk/storage/libstorage/src/Volume.cc Wed Aug 6 01:42:48 2008
@@ -1201,7 +1201,7 @@
switch( fs )
{
case SWAP:
- cmd = "mkswap " + mountDevice();
+ cmd = "mkswap " + quote(mountDevice());
c.execute( cmd );
if( c.retcode()!=0 )
ret = VOLUME_RESIZE_FAILED;
@@ -1213,7 +1213,7 @@
cmd = "echo y | " + cmd;
cmd += "-s " + decString(size_k) + "K ";
}
- cmd += mountDevice();
+ cmd += quote(mountDevice());
c.execute( cmd );
if( c.retcode()!=0 )
{
@@ -1225,7 +1225,7 @@
cmd = "echo y | ntfsresize -f ";
if( needShrink() )
cmd += "-s " + decString(size_k) + "k ";
- cmd += mountDevice();
+ cmd += quote(mountDevice());
c.setCombine();
c.execute( cmd );
if( c.retcode()!=0 )
@@ -1237,7 +1237,7 @@
break;
case EXT2:
case EXT3:
- cmd = "resize2fs -f " + mountDevice();
+ cmd = "resize2fs -f " + quote(mountDevice());
if( needShrink() )
cmd += " " + decString(size_k) + "K";
c.execute( cmd );
@@ -2018,24 +2018,24 @@
{
case EXT2:
case EXT3:
- cmd = "/sbin/tune2fs -L \"" + label + "\" " + mountDevice();
+ cmd = "/sbin/tune2fs -L " + quote(label) + " " +
quote(mountDevice());
break;
case REISERFS:
- cmd = "/sbin/reiserfstune -l \"" + label + "\" " +
mountDevice();
+ cmd = "/sbin/reiserfstune -l " + quote(label) + " " +
quote(mountDevice());
break;
case JFS:
- cmd = "/sbin/jfs_tune -L \"" + label + "\" " + mountDevice();
+ cmd = "/sbin/jfs_tune -L " + quote(label) + " " +
quote(mountDevice());
break;
case XFS:
{
string tlabel = label;
if( label.empty() )
tlabel = "--";
- cmd = "/usr/sbin/xfs_admin -L " + tlabel + " " + mountDevice();
+ cmd = "/usr/sbin/xfs_admin -L " + tlabel + " " +
quote(mountDevice());
}
break;
case SWAP:
- cmd = "/sbin/mkswap -L \"" + label + "\" " + mountDevice();
+ cmd = "/sbin/mkswap -L " + quote(label) + "\" " +
quote(mountDevice());
break;
default:
ret = VOLUME_MKLABEL_FS_UNABLE;

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages