Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49740 - in /trunk/storage/libstorage/src: DmraidCo.cc StorageDefines.h
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2008 20:11:23 -0000
  • Message-id: <20080805201123.427E139D1A@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Tue Aug 5 22:11:22 2008
New Revision: 49740

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

Modified:
trunk/storage/libstorage/src/DmraidCo.cc
trunk/storage/libstorage/src/StorageDefines.h

Modified: trunk/storage/libstorage/src/DmraidCo.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmraidCo.cc?rev=49740&r1=49739&r2=49740&view=diff
==============================================================================
--- trunk/storage/libstorage/src/DmraidCo.cc (original)
+++ trunk/storage/libstorage/src/DmraidCo.cc Tue Aug 5 22:11:22 2008
@@ -10,6 +10,7 @@
#include "y2storage/SystemCmd.h"
#include "y2storage/AppUtil.h"
#include "y2storage/Storage.h"
+#include "y2storage/StorageDefines.h"

using namespace std;
using namespace storage;
@@ -30,7 +31,7 @@
void DmraidCo::getRaidData( const string& name )
{
y2milestone( "name:%s", name.c_str() );
- SystemCmd c( "dmraid -s -c -c -c " + quote(name));
+ SystemCmd c(DMRAIDBIN " -s -c -c -c " + quote(name));
list<string>::const_iterator ci;
list<string> sl;
if( c.numLines()>0 )
@@ -110,11 +111,11 @@
if( val )
{
Dm::activate(true);
- c.execute( "dmraid -ay -p " );
+ c.execute(DMRAIDBIN " -ay -p");
}
else
{
- c.execute( "dmraid -an " );
+ c.execute(DMRAIDBIN " -an");
}
active = val;
}
@@ -123,7 +124,7 @@
void DmraidCo::getRaids( list<string>& l )
{
l.clear();
- SystemCmd c( "dmraid -s -c -c -c" );
+ SystemCmd c(DMRAIDBIN " -s -c -c -c");
for( unsigned i=0; i<c.numLines(); ++i )
{
list<string> sl = splitString( *c.getLine(i), ":" );
@@ -195,11 +196,11 @@
{
getStorage()->showInfoCb( removeText(true) );
}
- string cmd = "cd /var/log/YaST2 && echo y | dmraid -E -r";
+ string cmd = "cd /var/log/YaST2 && echo y | " DMRAIDBIN " -E -r";
SystemCmd c;
for( list<Pv>::const_iterator i=pv.begin(); i!=pv.end(); ++i )
{
- c.execute( cmd + " " + i->device );
+ c.execute(cmd + " " + quote(i->device));
}
if( c.retcode()!=0 )
{

Modified: trunk/storage/libstorage/src/StorageDefines.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageDefines.h?rev=49740&r1=49739&r2=49740&view=diff
==============================================================================
--- trunk/storage/libstorage/src/StorageDefines.h (original)
+++ trunk/storage/libstorage/src/StorageDefines.h Tue Aug 5 22:11:22 2008
@@ -25,6 +25,7 @@
#define MULTIPATHBIN "/sbin/multipath"
#define DMSETUPBIN "/sbin/dmsetup"
#define KPARTXBIN "/sbin/kpartx"
+#define DMRAIDBIN "/sbin/dmraid"


#endif

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

< Previous Next >
This Thread
  • No further messages