Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49735 - in /trunk/storage/libstorage/src: AppUtil.h Storage.cc SystemCmd.cc SystemCmd.h
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2008 16:18:44 -0000
  • Message-id: <20080805161844.3190639D06@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Tue Aug 5 18:18:43 2008
New Revision: 49735

URL: http://svn.opensuse.org/viewcvs/yast?rev=49735&view=rev
Log:
- moved variable system_cmd_testmode to SystemCmd

Modified:
trunk/storage/libstorage/src/AppUtil.h
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/SystemCmd.cc
trunk/storage/libstorage/src/SystemCmd.h

Modified: trunk/storage/libstorage/src/AppUtil.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.h?rev=49735&r1=49734&r2=49735&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.h (original)
+++ trunk/storage/libstorage/src/AppUtil.h Tue Aug 5 18:18:43 2008
@@ -96,7 +96,6 @@
return dngettext("storage", msgid, msgid_plural, n);
}

-extern bool system_cmd_testmode;
extern const string app_ws;

}

Modified: trunk/storage/libstorage/src/Storage.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=49735&r1=49734&r2=49735&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Tue Aug 5 18:18:43 2008
@@ -245,7 +245,7 @@

if( testmode )
{
- system_cmd_testmode = true;
+ SystemCmd::testmode = true;
rootprefix = testdir;
fstab = new EtcFstab( rootprefix );
string t = testdir+"/volume_info";

Modified: trunk/storage/libstorage/src/SystemCmd.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/SystemCmd.cc?rev=49735&r1=49734&r2=49735&view=diff
==============================================================================
--- trunk/storage/libstorage/src/SystemCmd.cc (original)
+++ trunk/storage/libstorage/src/SystemCmd.cc Tue Aug 5 18:18:43 2008
@@ -186,19 +186,19 @@
int sout[2];
int serr[2];
bool ok_bi = true;
- if( !system_cmd_testmode && pipe(sout)<0 )
+ if( !testmode && pipe(sout)<0 )
{
y2error( "pipe stdout creation failed errno=%d (%s)", errno,
strerror(errno));
ok_bi = false;
}
- if( !system_cmd_testmode && !Combine_b && pipe(serr)<0 )
+ if( !testmode && !Combine_b && pipe(serr)<0 )
{
y2error( "pipe stderr creation failed errno=%d (%s)", errno,
strerror(errno));
ok_bi = false;
}
- if( ok_bi && !system_cmd_testmode )
+ if( !testmode && ok_bi )
{
pfds[0].fd = sout[0];
if( fcntl( pfds[0].fd, F_SETFL, O_NONBLOCK )<0 )
@@ -289,7 +289,7 @@
break;
}
}
- else if( !system_cmd_testmode )
+ else if( !testmode )
{
Ret_i = -1;
}
@@ -302,7 +302,7 @@
{
y2error("system (%s) = %d", Cmd.c_str(), Ret_i);
}
- if( !system_cmd_testmode )
+ if( !testmode )
checkOutput();
y2milestone( "system() Returns:%d", Ret_i );
if( Ret_i!=0 )
@@ -694,3 +694,7 @@
}
return ret;
}
+
+
+bool SystemCmd::testmode = false;
+

Modified: trunk/storage/libstorage/src/SystemCmd.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/SystemCmd.h?rev=49735&r1=49734&r2=49735&view=diff
==============================================================================
--- trunk/storage/libstorage/src/SystemCmd.h (original)
+++ trunk/storage/libstorage/src/SystemCmd.h Tue Aug 5 18:18:43 2008
@@ -68,6 +68,8 @@
*/
static string quote(const std::list<string>& strs);

+ static bool testmode;
+
protected:

int placeOutput( unsigned Which_iv, std::vector<string> &Ret_Cr,
const bool Append_bv ) const;

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

< Previous Next >
This Thread
  • No further messages