Mailinglist Archive: yast-commit (953 mails)

< Previous Next >
[yast-commit] r49729 - in /trunk/storage/libstorage/src: Container.cc Disk.cc Dm.cc DmPart.cc DmPartCo.cc Loop.cc LvmLv.cc LvmVg.cc Md.cc Nfs.cc Partition.cc Storage.cc Volume.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 05 Aug 2008 15:31:49 -0000
  • Message-id: <20080805153149.E53FA39CF3@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Tue Aug 5 17:31:49 2008
New Revision: 49729

URL: http://svn.opensuse.org/viewcvs/yast?rev=49729&view=rev
Log:
- improvments to logging

Modified:
trunk/storage/libstorage/src/Container.cc
trunk/storage/libstorage/src/Disk.cc
trunk/storage/libstorage/src/Dm.cc
trunk/storage/libstorage/src/DmPart.cc
trunk/storage/libstorage/src/DmPartCo.cc
trunk/storage/libstorage/src/Loop.cc
trunk/storage/libstorage/src/LvmLv.cc
trunk/storage/libstorage/src/LvmVg.cc
trunk/storage/libstorage/src/Md.cc
trunk/storage/libstorage/src/Nfs.cc
trunk/storage/libstorage/src/Partition.cc
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/Volume.cc

Modified: trunk/storage/libstorage/src/Container.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Container.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Container.cc (original)
+++ trunk/storage/libstorage/src/Container.cc Tue Aug 5 17:31:49 2008
@@ -314,9 +314,9 @@

void
Container::logDifference( const Container& c ) const
- {
- y2milestone( "%s", getDiffString(c).c_str() );
- }
+{
+ y2mil(getDiffString(c));
+}

string
Container::getDiffString( const Container& c ) const
@@ -379,7 +379,7 @@
if( !ret )
{
if( verbose )
- y2milestone( "%s", getDiffString( *c ).c_str() );
+ y2mil(getDiffString( *c ));
}
else
{

Modified: trunk/storage/libstorage/src/Disk.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Disk.cc (original)
+++ trunk/storage/libstorage/src/Disk.cc Tue Aug 5 17:31:49 2008
@@ -2683,7 +2683,7 @@
else
log += " iSCSI-->";
}
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
ConstPartPair pp=partPair();
ConstPartIter i=pp.begin();
while( i!=pp.end() )

Modified: trunk/storage/libstorage/src/Dm.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dm.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Dm.cc (original)
+++ trunk/storage/libstorage/src/Dm.cc Tue Aug 5 17:31:49 2008
@@ -569,10 +569,10 @@
}

void Dm::logDifference( const Dm& rhs ) const
- {
- string log = stringDifference( rhs );
- y2milestone( "%s", log.c_str() );
- }
+{
+ string log = stringDifference(rhs);
+ y2mil(log);
+}

string Dm::stringDifference( const Dm& rhs ) const
{

Modified: trunk/storage/libstorage/src/DmPart.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPart.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/DmPart.cc (original)
+++ trunk/storage/libstorage/src/DmPart.cc Tue Aug 5 17:31:49 2008
@@ -182,10 +182,10 @@
}

void DmPart::logDifference( const DmPart& rhs ) const
- {
- string log = stringDifference( rhs );
- y2milestone( "%s", log.c_str() );
- }
+{
+ string log = stringDifference(rhs);
+ y2mil(log);
+}

DmPart& DmPart::operator= ( const DmPart& rhs )
{

Modified: trunk/storage/libstorage/src/DmPartCo.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPartCo.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/DmPartCo.cc (original)
+++ trunk/storage/libstorage/src/DmPartCo.cc Tue Aug 5 17:31:49 2008
@@ -968,7 +968,7 @@
void DmPartCo::logDifference( const DmPartCo& d ) const
{
string log = getDiffString( d );
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
ConstDmPartPair pp=dmpartPair();
ConstDmPartIter i=pp.begin();
while( i!=pp.end() )

Modified: trunk/storage/libstorage/src/Loop.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Loop.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Loop.cc (original)
+++ trunk/storage/libstorage/src/Loop.cc Tue Aug 5 17:31:49 2008
@@ -417,7 +417,7 @@
else
log += " delFile-->";
}
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
}

Loop& Loop::operator= ( const Loop& rhs )

Modified: trunk/storage/libstorage/src/LvmLv.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/LvmLv.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/LvmLv.cc (original)
+++ trunk/storage/libstorage/src/LvmLv.cc Tue Aug 5 17:31:49 2008
@@ -255,7 +255,7 @@
log += " Status:" + status + "-->" + rhs.status;
if( allocation!=rhs.allocation )
log += " Alloc:" + allocation + "-->" + rhs.allocation;
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
}

LvmLv& LvmLv::operator= ( const LvmLv& rhs )

Modified: trunk/storage/libstorage/src/LvmVg.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/LvmVg.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/LvmVg.cc (original)
+++ trunk/storage/libstorage/src/LvmVg.cc Tue Aug 5 17:31:49 2008
@@ -1454,7 +1454,7 @@
}
if( uuid!=p->uuid )
log += " UUID:" + uuid + "-->" + p->uuid;
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
ConstLvmLvPair pp=lvmLvPair();
ConstLvmLvIter i=pp.begin();
while( i!=pp.end() )

Modified: trunk/storage/libstorage/src/Md.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Md.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Md.cc (original)
+++ trunk/storage/libstorage/src/Md.cc Tue Aug 5 17:31:49 2008
@@ -650,7 +650,7 @@
b << " Spares:" << spare << "-->" << rhs.spare;
log += b.str();
}
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
}

Md& Md::operator= ( const Md& rhs )

Modified: trunk/storage/libstorage/src/Nfs.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Nfs.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Nfs.cc (original)
+++ trunk/storage/libstorage/src/Nfs.cc Tue Aug 5 17:31:49 2008
@@ -93,10 +93,10 @@
}

void Nfs::logDifference( const Nfs& rhs ) const
- {
- string log = Volume::logDifference( rhs );
- y2milestone( "%s", log.c_str() );
- }
+{
+ string log = Volume::logDifference(rhs);
+ y2mil(log);
+}

Nfs& Nfs::operator= ( const Nfs& rhs )
{

Modified: trunk/storage/libstorage/src/Partition.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Partition.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Partition.cc (original)
+++ trunk/storage/libstorage/src/Partition.cc Tue Aug 5 17:31:49 2008
@@ -642,7 +642,7 @@
else
log += " boot-->";
}
- y2milestone( "%s", log.c_str() );
+ y2mil(log);
}

bool Partition::equalContent( const Partition& rhs ) const

Modified: trunk/storage/libstorage/src/Storage.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Tue Aug 5 17:31:49 2008
@@ -211,19 +211,15 @@
}

void Storage::dumpObjectList()
- {
+{
ostringstream buf;
- printInfo( buf );
+ printInfo(buf);
std::list<string> l = splitString( buf.str(), "\n" );
- y2milestone( "DETECTED OBJECTS" );
- std::list<string>::const_iterator i = l.begin();
- while( i!=l.end() )
- {
- y2milestone( "%s", i->c_str() );
- ++i;
- }
- y2milestone( "END DETECTED OBJECTS" );
- }
+ y2mil("DETECTED OBJECTS");
+ for (std::list<string>::const_iterator i = l.begin(); i != l.end(); i++)
+ y2mil(*i);
+ y2mil("END DETECTED OBJECTS");
+}

void Storage::detectObjects()
{
@@ -3514,7 +3510,7 @@
b << "V:" << (*i)->vol()->device();
}
b << "> ";
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
b.str("");
todo.sort( cont_less<commitAction>() );
y2milestone( "stage %d", stage );
@@ -3526,7 +3522,7 @@
b << (*i)->name();
}
b << "> ";
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
b.str("");
b << "sorted vol <";
for( list<Volume*>::const_iterator i=vl.begin(); i!=vl.end(); ++i )
@@ -3536,7 +3532,7 @@
b << (*i)->device();
}
b << "> ";
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
b.str("");
b << "sorted actions <";
for( list<commitAction*>::const_iterator i=todo.begin(); i!=todo.end();
++i )
@@ -3549,7 +3545,7 @@
b << "V:" << (*i)->vol()->device();
}
b << "> ";
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
}

void Storage::handleHald( bool stop )

Modified: trunk/storage/libstorage/src/Volume.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=49729&r1=49728&r2=49729&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Volume.cc (original)
+++ trunk/storage/libstorage/src/Volume.cc Tue Aug 5 17:31:49 2008
@@ -261,7 +261,7 @@
loop_dev = fstab_loop_dev = entry.loop_dev;
b << " loop_dev:" << loop_dev << " encr:" << enc_names[encryption];
}
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
}
}

@@ -330,7 +330,7 @@
list<string> l = splitString( *loopData.getLine( 0, true ));
std::ostringstream b;
b << "line[" << device() << "]=" << l;
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
if( !l.empty() )
{
list<string>::const_iterator el = l.begin();
@@ -360,7 +360,7 @@
}
}
b << " encr:" << encryption;
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
}
}
}
@@ -383,7 +383,7 @@
true, true, "\"" );
std::ostringstream b;
b << "line[" << device() << "]=" << l;
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
if( !l.empty() )
{
l.pop_front();
@@ -467,7 +467,7 @@
}
alt_names.push_back( "/dev/disk/by-label/" + label );
}
- y2milestone( "%s", b.str().c_str() );
+ y2mil(b.str());
}
}
}

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

< Previous Next >
This Thread
  • No further messages