Author: aschnell Date: Tue Oct 28 13:40:38 2008 New Revision: 52624 URL: http://svn.opensuse.org/viewcvs/yast?rev=52624&view=rev Log: - some cleanup (while analysing bugs) Modified: trunk/storage/libstorage/src/DmPart.cc trunk/storage/libstorage/src/Dmmultipath.cc trunk/storage/libstorage/src/DmmultipathCo.cc trunk/storage/libstorage/src/Dmraid.cc trunk/storage/libstorage/src/DmraidCo.cc Modified: trunk/storage/libstorage/src/DmPart.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPart.cc?rev=52624&r1=52623&r2=52624&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmPart.cc (original) +++ trunk/storage/libstorage/src/DmPart.cc Tue Oct 28 13:40:38 2008 @@ -14,9 +14,10 @@ using namespace storage; using namespace std; -DmPart::DmPart( const DmPartCo& d, unsigned nr, Partition* pa ) : - Dm( d, "" ) - { + +DmPart::DmPart(const DmPartCo& d, unsigned nr, Partition* pa) + : Dm(d, "") +{ init( d.numToName(nr) ); numeric = true; num = nr; @@ -24,14 +25,15 @@ p = pa; if( pa ) setSize( pa->sizeK() ); - y2milestone( "constructed DmPart %s on co %s", dev.c_str(), - cont->name().c_str() ); - } + y2mil("constructed DmPart " << dev << " on co " << cont->name()); +} + DmPart::~DmPart() - { - y2debug( "destructed DmPart %s", dev.c_str() ); - } +{ + y2deb("destructed DmPart " << dev); +} + void DmPart::init( const string& name ) { @@ -187,16 +189,18 @@ y2mil(log); } -DmPart& DmPart::operator= ( const DmPart& rhs ) - { - y2debug( "operator= from %s", rhs.nm.c_str() ); + +DmPart& DmPart::operator=(const DmPart& rhs) +{ + y2deb("operator= from " << rhs.nm); *((Dm*)this) = rhs; - return( *this ); - } + return *this; +} -DmPart::DmPart( const DmPartCo& d, const DmPart& rhs ) : Dm(d,rhs) - { - y2debug( "constructed dmraid by copy constructor from %s", - rhs.dev.c_str() ); + +DmPart::DmPart(const DmPartCo& d, const DmPart& rhs) + : Dm(d, rhs) +{ + y2deb("constructed dmraid by copy constructor from " << rhs.dev); *this = rhs; - } +} Modified: trunk/storage/libstorage/src/Dmmultipath.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dmmultipath.cc?rev=52624&r1=52623&r2=52624&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dmmultipath.cc (original) +++ trunk/storage/libstorage/src/Dmmultipath.cc Tue Oct 28 13:40:38 2008 @@ -13,17 +13,19 @@ using namespace storage; using namespace std; -Dmmultipath::Dmmultipath( const DmmultipathCo& d, unsigned nr, Partition* p ) : - DmPart( d, nr, p ) - { - y2milestone( "constructed dmmultipath %s on co %s", dev.c_str(), - cont->name().c_str() ); - } + +Dmmultipath::Dmmultipath(const DmmultipathCo& d, unsigned nr, Partition* p) + : DmPart(d, nr, p) +{ + y2mil("constructed dmmultipath " << dev << " on co " << cont->name()); +} + Dmmultipath::~Dmmultipath() - { - y2debug( "destructed dmmultipath %s", dev.c_str() ); - } +{ + y2deb("destructed dmmultipath " << dev); +} + string Dmmultipath::removeText( bool doing ) const { @@ -242,10 +244,10 @@ DmPart::logDifference(rhs); } -Dmmultipath& Dmmultipath::operator= ( const Dmmultipath& rhs ) - { - y2debug( "operator= from %s", rhs.nm.c_str() ); - *((DmPart*)this) = rhs; - return( *this ); - } +Dmmultipath& Dmmultipath::operator=(const Dmmultipath& rhs) +{ + y2deb("operator= from " << rhs.nm); + *((DmPart*)this) = rhs; + return *this; +} Modified: trunk/storage/libstorage/src/DmmultipathCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmmultipathCo.cc?rev=52624&r1=52623&r2=52624&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmmultipathCo.cc (original) +++ trunk/storage/libstorage/src/DmmultipathCo.cc Tue Oct 28 13:40:38 2008 @@ -290,4 +290,3 @@ void DmmultipathCo::logData( const string& Dir ) {} bool DmmultipathCo::active = false; - Modified: trunk/storage/libstorage/src/Dmraid.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dmraid.cc?rev=52624&r1=52623&r2=52624&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dmraid.cc (original) +++ trunk/storage/libstorage/src/Dmraid.cc Tue Oct 28 13:40:38 2008 @@ -13,17 +13,19 @@ using namespace storage; using namespace std; -Dmraid::Dmraid( const DmraidCo& d, unsigned nr, Partition* p ) : - DmPart( d, nr, p ) - { - y2milestone( "constructed dmraid %s on co %s", dev.c_str(), - cont->name().c_str() ); - } + +Dmraid::Dmraid(const DmraidCo& d, unsigned nr, Partition* p) + : DmPart(d, nr, p) +{ + y2mil("constructed dmraid " << dev << " on co " << cont->name()); +} + Dmraid::~Dmraid() - { - y2debug( "destructed dmraid %s", dev.c_str() ); - } +{ + y2deb("destructed dmraid " << dev); +} + string Dmraid::removeText( bool doing ) const { @@ -94,7 +96,7 @@ txt = sformat( _("Create extended raid partition %1$s (%2$s)"), d.c_str(), sizeString().c_str() ); } - else + else { // displayed text before action, %1$s is replaced by raid partition e.g. pdc_dabaheedj_part1 // %2$s is replaced by size (e.g. 623.5 MB) @@ -155,7 +157,7 @@ // %2$s is replaced by size (e.g. 623.5 MB) // %3$s is replaced by file system type (e.g. reiserfs) txt = sformat( _("Format raid partition %1$s (%2$s) with %3$s"), - d.c_str(), sizeString().c_str(), + d.c_str(), sizeString().c_str(), fsTypeString().c_str() ); } } @@ -242,10 +244,10 @@ DmPart::logDifference(rhs); } -Dmraid& Dmraid::operator= ( const Dmraid& rhs ) - { - y2debug( "operator= from %s", rhs.nm.c_str() ); - *((DmPart*)this) = rhs; - return( *this ); - } +Dmraid& Dmraid::operator=(const Dmraid& rhs) +{ + y2deb("operator= from " << rhs.nm); + *((DmPart*)this) = rhs; + return *this; +} Modified: trunk/storage/libstorage/src/DmraidCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmraidCo.cc?rev=52624&r1=52623&r2=52624&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmraidCo.cc (original) +++ trunk/storage/libstorage/src/DmraidCo.cc Tue Oct 28 13:40:38 2008 @@ -2,8 +2,8 @@ Textdomain "storage" */ -#include <iostream> -#include <sstream> +#include <iostream> +#include <sstream> #include "y2storage/DmraidCo.h" #include "y2storage/Dmraid.h" @@ -15,18 +15,21 @@ using namespace std; using namespace storage; -DmraidCo::DmraidCo( Storage * const s, const string& Name, ProcPart& ppart ) : - DmPartCo(s, "/dev/mapper/"+Name, staticType(), ppart ) - { - DmPartCo::init( ppart ); - getRaidData( Name ); - y2debug( "constructing dmraid co %s", Name.c_str() ); - } + +DmraidCo::DmraidCo(Storage * const s, const string& Name, ProcPart& ppart) + : DmPartCo(s, "/dev/mapper/"+Name, staticType(), ppart) +{ + DmPartCo::init(ppart); + getRaidData(Name); + y2deb("constructing dmraid co " << Name); +} + DmraidCo::~DmraidCo() - { - y2debug( "destructed raid co %s", dev.c_str() ); - } +{ + y2deb("destructed raid co " << dev); +} + void DmraidCo::getRaidData( const string& name ) { @@ -91,7 +94,7 @@ void -DmraidCo::newP( DmPart*& dm, unsigned num, Partition* p ) +DmraidCo::newP( DmPart*& dm, unsigned num, Partition* p ) { y2mil( "num:" << num ); dm = new Dmraid( *this, num, p ); @@ -273,5 +276,3 @@ void DmraidCo::logData( const string& Dir ) {;} bool DmraidCo::active = false; - - -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org