Author: aschnell
Date: Thu Feb 26 22:26:27 2009
New Revision: 55804
URL: http://svn.opensuse.org/viewcvs/yast?rev=55804&view=rev
Log:
- use new logging functions
Modified:
trunk/storage/libstorage/src/Volume.cc
Modified: trunk/storage/libstorage/src/Volume.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=55804&r1=55803&r2=55804&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Volume.cc (original)
+++ trunk/storage/libstorage/src/Volume.cc Thu Feb 26 22:26:27 2009
@@ -316,7 +316,7 @@
mp.clear();
}
if( is_mounted )
- y2milestone( "%s mounted on %s", device().c_str(), mp.c_str() );
+ y2mil(device() << " mounted on " << mp);
}
orig_mp = mp;
}
@@ -487,8 +487,7 @@
int Volume::setFormat( bool val, storage::FsType new_fs )
{
int ret = 0;
- y2milestone( "device:%s val:%d fs:%s", dev.c_str(), val,
- fs_names[new_fs].c_str() );
+ y2mil("device:" << dev << " val:" << val << " fs:" << fs_names[new_fs]);
format = val;
if( !format )
{
@@ -615,8 +614,7 @@
int Volume::changeFstabOptions( const string& options )
{
int ret = 0;
- y2milestone( "device:%s options:%s encr:%s", dev.c_str(), options.c_str(),
- encTypeString(encryption).c_str() );
+ y2mil("device:" << dev << " options:" << options << " encr:" << encTypeString(encryption));
if( uby.type() != UB_NONE )
{
ret = VOLUME_ALREADY_IN_USE;
@@ -923,7 +921,7 @@
int Volume::umount( const string& mp )
{
SystemCmd cmd;
- y2milestone( "device:%s mp:%s", dev.c_str(), mp.c_str() );
+ y2mil("device:" << dev << " mp:" << mp);
string d = mountDevice();
if( dmcrypt_active )
d = dmcrypt_dev;
@@ -1070,7 +1068,7 @@
void Volume::rename( const string& newName )
{
- y2milestone( "rename old:%s new:%s", nm.c_str(), newName.c_str() );
+ y2mil("rename old:" << nm << " new:" << newName);
string::size_type pos;
if( (pos=dev.rfind( nm ))!=string::npos )
{
@@ -1100,7 +1098,7 @@
ret = VOLUME_DEVICE_NOT_PRESENT;
else if( !S_ISBLK(sbuf.st_mode) )
ret = VOLUME_DEVICE_NOT_BLOCK;
- y2milestone( "checkDevice:%s ret:%d", device.c_str(), ret );
+ y2mil("checkDevice:" << device << " ret:" << ret);
return( ret );
}
@@ -1112,8 +1110,7 @@
lmount += cont->getStorage()->root();
if( mp!="/" )
lmount += mp;
- y2milestone( "device:%s mp:%s old mp:%s", dev.c_str(), mp.c_str(),
- orig_mp.c_str() );
+ y2mil("device:" << dev << " mp:" << mp << " old mp:" << orig_mp);
if( !silent() )
{
cont->getStorage()->showInfoCb( mountText(true) );
@@ -1163,7 +1160,7 @@
int Volume::canResize( unsigned long long newSizeK ) const
{
int ret=0;
- y2milestone( "val:%llu", newSizeK );
+ y2mil("val:" << newSizeK);
if( uby.type() != UB_NONE )
{
ret = VOLUME_ALREADY_IN_USE;
@@ -1302,7 +1299,7 @@
int Volume::setEncryption( bool val, EncryptType typ )
{
int ret = 0;
- y2milestone( "val:%d typ:%d", val, typ );
+ y2mil("val:" << val << " typ:" << typ);
if( getUsedByType() != UB_NONE )
{
ret = VOLUME_ALREADY_IN_USE;
@@ -1442,8 +1439,7 @@
else
fstab_loop_dev = loop_dev;
}
- y2milestone( "loop_dev:%s fstab_loop_dev:%s", loop_dev.c_str(),
- fstab_loop_dev.c_str() );
+ y2mil("loop_dev:" << loop_dev << " fstab_loop_dev:" << fstab_loop_dev);
return( ret );
}
@@ -1476,7 +1472,7 @@
string cmd = LOSETUPBIN " " + quote(loop_dev) + " ";
const Loop* l = static_cast