Author: aschnell
Date: Thu Nov 13 11:17:37 2008
New Revision: 53257
URL: http://svn.opensuse.org/viewcvs/yast?rev=53257&view=rev
Log:
- converted some log calls
Modified:
trunk/storage/libstorage/src/SystemCmd.cc
Modified: trunk/storage/libstorage/src/SystemCmd.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/SystemCmd.cc?rev=53257&r1=53256&r2=53257&view=diff
==============================================================================
--- trunk/storage/libstorage/src/SystemCmd.cc (original)
+++ trunk/storage/libstorage/src/SystemCmd.cc Thu Nov 13 11:17:37 2008
@@ -102,9 +102,8 @@
long unsigned MaxTimeSec,
long unsigned MaxLineOut,
bool& ExceedTime, bool& ExceedLines )
- {
- y2milestone( "cmd:%s MaxTime:%lu MaxLines:%lu", Command_Cv.c_str(),
- MaxTimeSec, MaxLineOut );
+{
+ y2mil("cmd:" << Command_Cv << " MaxTime:" << MaxTimeSec << " MaxLines:" << MaxLineOut);
ExceedTime = ExceedLines = false;
int ret = executeBackground( Command_Cv );
unsigned long ts = 0;
@@ -157,10 +156,9 @@
}
else
Ret_i = ret;
- y2milestone( "ret:%d ExceedTime:%d ExceedLines:%d", ret, ExceedTime,
- ExceedLines );
+ y2mil("ret:" << ret << " ExceedTime:" << ExceedTime << " ExceedLines:" << ExceedLines);
return ret;
- }
+}
#define PRIMARY_SHELL "/bin/sh"
@@ -180,7 +178,7 @@
{
output_proc->reset();
}
- y2debug( "Cmd:%s", Cmd.c_str() );
+ y2deb("Cmd:" << Cmd);
File_aC[IDX_STDERR] = File_aC[IDX_STDOUT] = NULL;
invalidate();
@@ -297,15 +295,15 @@
else
{
Ret_i = 0;
- y2milestone( "TESTMODE would execute \"%s\"", Cmd.c_str() );
+ y2mil("TESTMODE would execute \"" << Cmd << "\"");
}
if( Ret_i==-127 || Ret_i==-1 )
{
- y2error("system (%s) = %d", Cmd.c_str(), Ret_i);
+ y2err("system (\"" << Cmd << "\") = " << Ret_i);
}
if( !testmode )
checkOutput();
- y2milestone( "system() Returns:%d", Ret_i );
+ y2mil("system() Returns:" << Ret_i);
if( Ret_i!=0 )
logOutput();
return Ret_i;
@@ -376,7 +374,7 @@
{
if( Idx_iv > 1 )
{
- y2error("invalid index %d", Idx_iv );
+ y2err("invalid index " << Idx_iv);
}
if( !Valid_ab[Idx_iv] )
{
@@ -402,7 +400,7 @@
if( Idx_iv > 1 )
{
- y2error("invalid index %d", Idx_iv );
+ y2err("invalid index " << Idx_iv);
}
if( Sel_bv )
{
@@ -412,7 +410,7 @@
{
Ret_ii = Lines_aC[Idx_iv].size();
}
- y2debug("ret:%u", Ret_ii );
+ y2deb("ret:" << Ret_ii);
return Ret_ii;
}
@@ -423,7 +421,7 @@
if( Idx_iv > 1 )
{
- y2error("invalid index %d", Idx_iv );
+ y2err("invalid index " << Idx_iv);
}
if( Sel_bv )
{
@@ -454,7 +452,7 @@
if( Idx_iv > 1 )
{
- y2error("invalid index %d", Idx_iv );
+ y2err("invalid index " << Idx_iv);
}
BeginOfLine_bi = Search_Ci.length()>0 && Search_Ci[0]=='^';
if( BeginOfLine_bi )
@@ -579,11 +577,10 @@
{
NewLine_br = true;
}
- y2debug( "Text_Ci:%s NewLine:%d", Text_Ci.c_str(), NewLine_br );
+ y2deb("Text_Ci:" << Text_Ci << " NewLine:" << NewLine_br);
if( old_size != Lines_Cr.size() )
{
- y2milestone( "pid:%d added lines:%zd stderr:%d", Pid_i,
- Lines_Cr.size()-old_size, Stderr_bv );
+ y2mil("pid:" << Pid_i << " added lines:" << Lines_Cr.size() - old_size << " stderr:" << Stderr_bv);
}
}
@@ -629,12 +626,13 @@
void
SystemCmd::logOutput() const
- {
- for( unsigned i=0; i