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?... ============================================================================== --- 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... ============================================================================== --- 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.... ============================================================================== --- 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.... ============================================================================== --- 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@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org