Author: aschnell Date: Wed Mar 25 12:22:12 2009 New Revision: 56384 URL: http://svn.opensuse.org/viewcvs/yast?rev=56384&view=rev Log: - minor namespace cleanup Modified: trunk/storage/libstorage/src/AppUtil.cc trunk/storage/libstorage/src/AsciiFile.cc trunk/storage/libstorage/src/Container.cc trunk/storage/libstorage/src/Dasd.cc trunk/storage/libstorage/src/Disk.cc trunk/storage/libstorage/src/Dm.cc trunk/storage/libstorage/src/DmCo.cc trunk/storage/libstorage/src/DmPart.cc trunk/storage/libstorage/src/DmPartCo.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 trunk/storage/libstorage/src/EtcFstab.cc trunk/storage/libstorage/src/EtcRaidtab.cc trunk/storage/libstorage/src/Graph.cc trunk/storage/libstorage/src/HumanString.cc trunk/storage/libstorage/src/Loop.cc trunk/storage/libstorage/src/LoopCo.cc trunk/storage/libstorage/src/LvmLv.cc trunk/storage/libstorage/src/LvmVg.cc trunk/storage/libstorage/src/Md.cc trunk/storage/libstorage/src/MdCo.cc trunk/storage/libstorage/src/Nfs.cc trunk/storage/libstorage/src/NfsCo.cc trunk/storage/libstorage/src/OutputProcessor.cc trunk/storage/libstorage/src/Partition.cc trunk/storage/libstorage/src/PeContainer.cc trunk/storage/libstorage/src/ProcMounts.cc trunk/storage/libstorage/src/ProcPart.cc trunk/storage/libstorage/src/Regex.cc trunk/storage/libstorage/src/Storage.cc trunk/storage/libstorage/src/StorageTypes.cc trunk/storage/libstorage/src/SystemCmd.cc trunk/storage/libstorage/src/Volume.cc Modified: trunk/storage/libstorage/src/AppUtil.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/AppUtil.cc (original) +++ trunk/storage/libstorage/src/AppUtil.cc Wed Mar 25 12:22:12 2009 @@ -24,10 +24,10 @@ #include "y2storage/StorageTypes.h" -using namespace std; - namespace storage { + using namespace std; + string dupDash(const string& s) { Modified: trunk/storage/libstorage/src/AsciiFile.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AsciiFile.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/AsciiFile.cc (original) +++ trunk/storage/libstorage/src/AsciiFile.cc Wed Mar 25 12:22:12 2009 @@ -11,8 +11,10 @@ #include "y2storage/SystemCmd.h" #include "y2storage/AsciiFile.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; AsciiFile::AsciiFile(const char* Name_Cv, bool remove_empty) @@ -203,3 +205,5 @@ if (Text_Cr.length() > 0 && Text_Cr[Text_Cr.length() - 1] == Char_cv) Text_Cr.erase(Text_Cr.length() - 1); } + +} Modified: trunk/storage/libstorage/src/Container.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Container.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Container.cc (original) +++ trunk/storage/libstorage/src/Container.cc Wed Mar 25 12:22:12 2009 @@ -11,8 +11,11 @@ #include "y2storage/Storage.h" #include "y2storage/AppUtil.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + Container::Container( Storage * const s, const string& Name, CType t ) : sto(s), nm(Name) @@ -288,9 +291,6 @@ } -namespace storage -{ - std::ostream& operator<< ( std::ostream& s, const Container &c ) { s << "Type:" << Container::type_names[c.typ] @@ -308,7 +308,7 @@ s << c.uby; return( s ); } -} + void Container::logDifference( const Container& c ) const @@ -418,3 +418,4 @@ const string Container::type_names[] = { "UNKNOWN", "DISK", "MD", "LOOP", "LVM", "DM", "DMRAID", "NFS", "DMMULTIPATH" }; +} Modified: trunk/storage/libstorage/src/Dasd.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dasd.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dasd.cc (original) +++ trunk/storage/libstorage/src/Dasd.cc Wed Mar 25 12:22:12 2009 @@ -16,8 +16,11 @@ #include "y2storage/Dasd.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + Dasd::Dasd( Storage * const s, const string& Name, unsigned long long SizeK ) : @@ -636,12 +639,12 @@ y2deb("constructed dasd by copy constructor from " << rhs.nm); } -namespace storage -{ + std::ostream& operator<< (std::ostream& s, const Dasd& d ) { s << *((Disk*)&d); s << " fmt:" << d.fmt; return( s ); } + } Modified: trunk/storage/libstorage/src/Disk.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Disk.cc (original) +++ trunk/storage/libstorage/src/Disk.cc Wed Mar 25 12:22:12 2009 @@ -23,8 +23,11 @@ #include "y2storage/SystemCmd.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + Disk::Disk( Storage * const s, const string& Name, unsigned long long SizeK ) : @@ -2601,8 +2604,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Disk& d ) { @@ -2635,7 +2636,6 @@ return( s ); } -} void Disk::logDifference( const Container& d ) const { @@ -2793,3 +2793,4 @@ } } +} Modified: trunk/storage/libstorage/src/Dm.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dm.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dm.cc (original) +++ trunk/storage/libstorage/src/Dm.cc Wed Mar 25 12:22:12 2009 @@ -12,8 +12,11 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; + Dm::Dm( const PeContainer& d, const string& tn ) : Volume( d ), tname(tn) @@ -540,8 +543,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Dm &p ) { @@ -567,7 +568,6 @@ return( s ); } -} bool Dm::equalContent( const Dm& rhs ) const { @@ -626,3 +626,4 @@ static const char* elem[] = { "crypt" }; list<string> Dm::known_types( elem, elem+lengthof(elem) ); +} Modified: trunk/storage/libstorage/src/DmCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmCo.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmCo.cc (original) +++ trunk/storage/libstorage/src/DmCo.cc Wed Mar 25 12:22:12 2009 @@ -13,8 +13,11 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + DmCo::DmCo( Storage * const s, bool detect, ProcPart& ppart ) : PeContainer(s,staticType()) @@ -350,8 +353,6 @@ return( ret ); } -namespace storage -{ inline std::ostream& operator<< (std::ostream& s, const DmCo& d ) { @@ -359,7 +360,6 @@ return( s ); } -} void DmCo::logDifference( const Container& d ) const { @@ -437,3 +437,5 @@ void DmCo::logData( const string& Dir ) {;} + +} Modified: trunk/storage/libstorage/src/DmPart.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPart.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmPart.cc (original) +++ trunk/storage/libstorage/src/DmPart.cc Wed Mar 25 12:22:12 2009 @@ -11,8 +11,10 @@ #include "y2storage/AppUtil.h" #include "y2storage/Storage.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; DmPart::DmPart(const DmPartCo& d, unsigned nr, Partition* pa) @@ -179,8 +181,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const DmPart &p ) { @@ -188,7 +188,6 @@ return( s ); } -} bool DmPart::equalContent( const DmPart& rhs ) const { @@ -216,3 +215,5 @@ y2deb("constructed dmraid by copy constructor from " << rhs.dev); *this = rhs; } + +} Modified: trunk/storage/libstorage/src/DmPartCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPartCo.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmPartCo.cc (original) +++ trunk/storage/libstorage/src/DmPartCo.cc Wed Mar 25 12:22:12 2009 @@ -14,8 +14,11 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + DmPartCo::DmPartCo( Storage * const s, const string& name, storage::CType t, ProcPart& ppart ) : @@ -950,8 +953,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const DmPartCo& d ) { @@ -969,7 +970,6 @@ return( s ); } -} string DmPartCo::getDiffString( const Container& d ) const { @@ -1082,3 +1082,4 @@ void DmPartCo::logData( const string& Dir ) {;} +} Modified: trunk/storage/libstorage/src/Dmmultipath.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dmmultipath.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dmmultipath.cc (original) +++ trunk/storage/libstorage/src/Dmmultipath.cc Wed Mar 25 12:22:12 2009 @@ -10,8 +10,10 @@ #include "y2storage/AppUtil.h" #include "y2storage/Storage.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; Dmmultipath::Dmmultipath(const DmmultipathCo& d, unsigned nr, Partition* p) @@ -223,8 +225,6 @@ tinfo.p = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Dmmultipath &p ) { @@ -232,7 +232,6 @@ return( s ); } -} bool Dmmultipath::equalContent( const Dmmultipath& rhs ) const { @@ -251,3 +250,5 @@ *((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=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmmultipathCo.cc (original) +++ trunk/storage/libstorage/src/DmmultipathCo.cc Wed Mar 25 12:22:12 2009 @@ -14,8 +14,10 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; DmmultipathCo::DmmultipathCo( Storage * const s, const string& Name, ProcPart& ppart ) : @@ -241,8 +243,6 @@ tinfo.model = model; } -namespace storage -{ std::ostream& operator<<(std::ostream& s, const DmmultipathCo& d) { @@ -252,7 +252,6 @@ return s; } -} string DmmultipathCo::getDiffString( const Container& d ) const { @@ -289,3 +288,5 @@ 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=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Dmraid.cc (original) +++ trunk/storage/libstorage/src/Dmraid.cc Wed Mar 25 12:22:12 2009 @@ -10,8 +10,10 @@ #include "y2storage/AppUtil.h" #include "y2storage/Storage.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; Dmraid::Dmraid(const DmraidCo& d, unsigned nr, Partition* p) @@ -223,8 +225,6 @@ tinfo.p = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Dmraid &p ) { @@ -232,7 +232,6 @@ return( s ); } -} bool Dmraid::equalContent( const Dmraid& rhs ) const { @@ -251,3 +250,5 @@ *((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=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/DmraidCo.cc (original) +++ trunk/storage/libstorage/src/DmraidCo.cc Wed Mar 25 12:22:12 2009 @@ -12,8 +12,10 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; DmraidCo::DmraidCo(Storage * const s, const string& Name, ProcPart& ppart) @@ -228,8 +230,6 @@ tinfo.p = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const DmraidCo& d ) { @@ -239,7 +239,6 @@ return( s ); } -} string DmraidCo::getDiffString( const Container& d ) const { @@ -276,3 +275,5 @@ void DmraidCo::logData( const string& Dir ) {;} bool DmraidCo::active = false; + +} Modified: trunk/storage/libstorage/src/EtcFstab.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/EtcFstab.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/EtcFstab.cc (original) +++ trunk/storage/libstorage/src/EtcFstab.cc Wed Mar 25 12:22:12 2009 @@ -15,8 +15,11 @@ #include "y2storage/Volume.h" #include "y2storage/EtcFstab.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; + EtcFstab::EtcFstab(const string& pfx, bool rootMounted) : prefix(pfx) @@ -872,3 +875,4 @@ unsigned EtcFstab::cryptotabFields[] = { 11, 15, 20, 10, 10, 1 }; unsigned EtcFstab::crypttabFields[] = { 15, 20, 10, 1 }; +} Modified: trunk/storage/libstorage/src/EtcRaidtab.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/EtcRaidtab.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/EtcRaidtab.cc (original) +++ trunk/storage/libstorage/src/EtcRaidtab.cc Wed Mar 25 12:22:12 2009 @@ -11,8 +11,10 @@ #include "y2storage/AsciiFile.h" #include "y2storage/Md.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; EtcRaidtab::EtcRaidtab(const string& prefix) @@ -105,3 +107,5 @@ lineno++; } } + +} Modified: trunk/storage/libstorage/src/Graph.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Graph.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Graph.cc (original) +++ trunk/storage/libstorage/src/Graph.cc Wed Mar 25 12:22:12 2009 @@ -19,12 +19,11 @@ #include "y2storage/StorageInterface.h" -using namespace std; -using namespace storage; - - namespace storage { + using namespace std; + + enum NodeType { NODE_DISK, NODE_DMMULTIPATH, NODE_DMRAID, NODE_PARTITION, NODE_MDRAID, NODE_LVMVG, NODE_LVMLV, NODE_DM, NODE_MOUNTPOINT }; Modified: trunk/storage/libstorage/src/HumanString.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/HumanString.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/HumanString.cc (original) +++ trunk/storage/libstorage/src/HumanString.cc Wed Mar 25 12:22:12 2009 @@ -14,11 +14,10 @@ #include "HumanString.h" -using namespace std; - - namespace storage { + using namespace std; + int numSuffixes() Modified: trunk/storage/libstorage/src/Loop.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Loop.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Loop.cc (original) +++ trunk/storage/libstorage/src/Loop.cc Wed Mar 25 12:22:12 2009 @@ -15,8 +15,10 @@ #include "y2storage/SystemCmd.h" #include "y2storage/StorageDefines.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; Loop::Loop(const LoopCo& d, const string& LoopDev, const string& LoopFile, @@ -381,8 +383,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Loop& l ) { @@ -395,7 +395,6 @@ return( s ); } -} bool Loop::equalContent( const Loop& rhs ) const { @@ -447,3 +446,5 @@ unsigned Loop::loop_major = 0; + +} Modified: trunk/storage/libstorage/src/LoopCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/LoopCo.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/LoopCo.cc (original) +++ trunk/storage/libstorage/src/LoopCo.cc Wed Mar 25 12:22:12 2009 @@ -15,8 +15,10 @@ #include "y2storage/EtcFstab.h" #include "y2storage/StorageDefines.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; LoopCo::LoopCo(Storage * const s, bool detect, ProcPart& ppart) @@ -339,8 +341,6 @@ void LoopCo::logData( const string& Dir ) {;} -namespace storage -{ inline std::ostream& operator<< (std::ostream& s, const LoopCo& d ) { @@ -348,7 +348,6 @@ return( s ); } -} void LoopCo::logDifference( const Container& d ) const { @@ -426,3 +425,5 @@ vols.push_back( p ); } } + +} Modified: trunk/storage/libstorage/src/LvmLv.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/LvmLv.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/LvmLv.cc (original) +++ trunk/storage/libstorage/src/LvmLv.cc Wed Mar 25 12:22:12 2009 @@ -11,8 +11,10 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; LvmLv::LvmLv(const LvmVg& d, const string& name, const string& origi, @@ -302,8 +304,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const LvmLv &p ) { @@ -317,7 +317,6 @@ return( s ); } -} bool LvmLv::equalContent( const LvmLv& rhs ) const { @@ -354,3 +353,4 @@ *this = rhs; } +} Modified: trunk/storage/libstorage/src/LvmVg.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/LvmVg.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/LvmVg.cc (original) +++ trunk/storage/libstorage/src/LvmVg.cc Wed Mar 25 12:22:12 2009 @@ -12,8 +12,11 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + static bool lvNotCreated( const LvmLv& l ) { return( !l.created() ); } static bool lvNotDeletedCreated( const LvmLv& l ) { return( !l.created()&&!l.deleted() ); } @@ -1590,8 +1593,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const LvmVg& d ) { @@ -1606,7 +1607,6 @@ return( s ); } -} void LvmVg::logDifference( const Container& d ) const { @@ -1709,3 +1709,4 @@ bool LvmVg::active = false; +} Modified: trunk/storage/libstorage/src/Md.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Md.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Md.cc (original) +++ trunk/storage/libstorage/src/Md.cc Wed Mar 25 12:22:12 2009 @@ -15,8 +15,11 @@ #include "y2storage/Container.h" #include "y2storage/StorageDefines.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; + Md::Md( const MdCo& d, unsigned PNr, MdType Type, const list<string>& devices ) : Volume( d, PNr, 0 ) @@ -591,8 +594,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Md& m ) { @@ -614,7 +615,6 @@ return( s ); } -} bool Md::equalContent( const Md& rhs ) const { @@ -690,3 +690,4 @@ "right-asymmetric", "right-symmetric" }; unsigned Md::md_major = 0; +} Modified: trunk/storage/libstorage/src/MdCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/MdCo.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/MdCo.cc (original) +++ trunk/storage/libstorage/src/MdCo.cc Wed Mar 25 12:22:12 2009 @@ -13,8 +13,11 @@ #include "y2storage/EtcRaidtab.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + MdCo::MdCo( Storage * const s, bool detect ) : Container(s,"md",staticType()) @@ -698,16 +701,12 @@ } -namespace storage -{ - std::ostream& operator<< (std::ostream& s, const MdCo& d ) { s << *((Container*)&d); return( s ); } -} void MdCo::logDifference( const Container& d ) const { @@ -790,3 +789,4 @@ bool MdCo::active = false; +} Modified: trunk/storage/libstorage/src/Nfs.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Nfs.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Nfs.cc (original) +++ trunk/storage/libstorage/src/Nfs.cc Wed Mar 25 12:22:12 2009 @@ -13,8 +13,11 @@ #include "y2storage/Storage.h" #include "y2storage/SystemCmd.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; + Nfs::Nfs( const NfsCo& d, const string& NfsDev ) : Volume( d, 0, 0 ) @@ -76,8 +79,6 @@ tinfo = info; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Nfs& l ) { @@ -85,7 +86,6 @@ return( s ); } -} bool Nfs::equalContent( const Nfs& rhs ) const { @@ -110,3 +110,5 @@ y2deb("constructed nfs by copy constructor from " << rhs.nm); *this = rhs; } + +} Modified: trunk/storage/libstorage/src/NfsCo.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/NfsCo.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/NfsCo.cc (original) +++ trunk/storage/libstorage/src/NfsCo.cc Wed Mar 25 12:22:12 2009 @@ -12,8 +12,11 @@ #include "y2storage/Storage.h" #include "y2storage/EtcFstab.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; + NfsCo::NfsCo( Storage * const s, ProcMounts& mounts ) : Container(s,"nfs",staticType()) @@ -207,8 +210,6 @@ void NfsCo::logData( const string& Dir ) {;} -namespace storage -{ inline std::ostream& operator<< (std::ostream& s, const NfsCo& d ) { @@ -216,7 +217,6 @@ return( s ); } -} void NfsCo::logDifference( const Container& d ) const { @@ -292,3 +292,5 @@ vols.push_back( p ); } } + +} Modified: trunk/storage/libstorage/src/OutputProcessor.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/OutputProcessor.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/OutputProcessor.cc (original) +++ trunk/storage/libstorage/src/OutputProcessor.cc Wed Mar 25 12:22:12 2009 @@ -8,8 +8,11 @@ #include "y2storage/StorageTmpl.h" #include "y2storage/OutputProcessor.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + void OutputProcessor::process( const string& val, bool stderr ) @@ -155,3 +158,5 @@ } } } + +} Modified: trunk/storage/libstorage/src/Partition.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Partition.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Partition.cc (original) +++ trunk/storage/libstorage/src/Partition.cc Wed Mar 25 12:22:12 2009 @@ -9,8 +9,11 @@ #include "y2storage/Disk.h" #include "y2storage/Storage.h" -using namespace storage; -using namespace std; + +namespace storage +{ + using namespace std; + static string udevCompleteIdPath( const string& s, unsigned nr ) { @@ -584,8 +587,7 @@ tinfo = info; } -namespace storage -{ + PartitionInfo& PartitionInfo::operator=( const PartitionAddInfo& rhs ) { nr = rhs.nr; @@ -616,7 +618,6 @@ return( s ); } -} void Partition::logDifference( const Partition& rhs ) const { @@ -673,3 +674,4 @@ string Partition::pt_names[] = { "primary", "extended", "logical", "any" }; +} Modified: trunk/storage/libstorage/src/PeContainer.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/PeContainer.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/PeContainer.cc (original) +++ trunk/storage/libstorage/src/PeContainer.cc Wed Mar 25 12:22:12 2009 @@ -10,8 +10,11 @@ #include "y2storage/AppUtil.h" #include "y2storage/Storage.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + PeContainer::PeContainer( Storage * const s, CType t ) : Container(s,"",t) @@ -562,8 +565,6 @@ } } -namespace storage -{ void printDevList( std::ostream& s, const std::listPeContainer::Pv& l ) { @@ -613,7 +614,6 @@ return( s ); } -} string PeContainer::getDiffString( const Container& rhs ) const { @@ -751,3 +751,4 @@ *this = rhs; } +} Modified: trunk/storage/libstorage/src/ProcMounts.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/ProcMounts.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/ProcMounts.cc (original) +++ trunk/storage/libstorage/src/ProcMounts.cc Wed Mar 25 12:22:12 2009 @@ -12,8 +12,11 @@ #include "y2storage/Storage.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + ProcMounts::ProcMounts( Storage * const sto ) { @@ -174,3 +177,4 @@ } } +} Modified: trunk/storage/libstorage/src/ProcPart.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/ProcPart.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/ProcPart.cc (original) +++ trunk/storage/libstorage/src/ProcPart.cc Wed Mar 25 12:22:12 2009 @@ -10,8 +10,11 @@ #include "y2storage/StorageTmpl.h" #include "y2storage/ProcPart.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; + ProcPart::ProcPart() : AsciiFile( "/proc/partitions" ) { @@ -78,3 +81,4 @@ return( ret ); } +} Modified: trunk/storage/libstorage/src/Regex.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Regex.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Regex.cc (original) +++ trunk/storage/libstorage/src/Regex.cc Wed Mar 25 12:22:12 2009 @@ -6,12 +6,12 @@ #include "Regex.h" -using namespace storage; - - extern int _nl_msg_cat_cntr; +namespace storage +{ + Regex::Regex (const char* pattern, int cflags, unsigned int nm) : pattern (pattern), cflags (cflags), @@ -78,5 +78,8 @@ return ""; } + const string Regex::ws = "[ \t]*"; const string Regex::number = "[0123456789]+"; + +} Modified: trunk/storage/libstorage/src/Storage.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Storage.cc (original) +++ trunk/storage/libstorage/src/Storage.cc Wed Mar 25 12:22:12 2009 @@ -37,8 +37,10 @@ #include "y2storage/AsciiFile.h" #include "y2storage/StorageDefines.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; void @@ -592,8 +594,7 @@ } } -namespace storage -{ + struct DiskData { enum DTyp { DISK, DASD, XEN }; @@ -608,6 +609,7 @@ string dev; }; + std::ostream& operator<< ( std::ostream& s, const storage::DiskData& d ) { s << d.name << "," << d.typ << "," << d.s << "," << d.d; @@ -615,7 +617,6 @@ s << "," << d.dev; return( s ); } -} void @@ -939,8 +940,6 @@ bool Storage::is_ppc_pegasos = false; -namespace storage -{ void initDefaultLogger () { Storage::initDefaultLogger (); @@ -974,7 +973,6 @@ { delete p; } -} int @@ -5856,15 +5854,11 @@ } -namespace storage -{ std::ostream& operator<< (std::ostream& s, Storage &v ) { v.printInfo(s); return(s); } -} - Storage::SkipDeleted Storage::SkipDel; @@ -5873,3 +5867,5 @@ storage::CallbackShowInstallInfo Storage::install_info_cb_ycp; storage::CallbackInfoPopup Storage::info_popup_cb_ycp; storage::CallbackYesNoPopup Storage::yesno_popup_cb_ycp; + +} Modified: trunk/storage/libstorage/src/StorageTypes.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageTypes.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/StorageTypes.cc (original) +++ trunk/storage/libstorage/src/StorageTypes.cc Wed Mar 25 12:22:12 2009 @@ -1,6 +1,7 @@ #include "y2storage/StorageTypes.h" #include "y2storage/Volume.h" + namespace storage { @@ -112,5 +113,4 @@ return s; } - } Modified: trunk/storage/libstorage/src/SystemCmd.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/SystemCmd.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/SystemCmd.cc (original) +++ trunk/storage/libstorage/src/SystemCmd.cc Wed Mar 25 12:22:12 2009 @@ -18,8 +18,10 @@ #include "y2storage/SystemCmd.h" #include "y2storage/OutputProcessor.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; SystemCmd::SystemCmd( const string& Command_Cv ) @@ -596,3 +598,5 @@ bool SystemCmd::testmode = false; + +} Modified: trunk/storage/libstorage/src/Volume.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=56384&r1=56383&r2=56384&view=diff ============================================================================== --- trunk/storage/libstorage/src/Volume.cc (original) +++ trunk/storage/libstorage/src/Volume.cc Wed Mar 25 12:22:12 2009 @@ -22,8 +22,10 @@ #include "y2storage/StorageDefines.h" #include "y2storage/HumanString.h" -using namespace std; -using namespace storage; + +namespace storage +{ + using namespace std; Volume::Volume(const Container& d, unsigned PNr, unsigned long long SizeK) @@ -2785,8 +2787,6 @@ crypt_pwd = i->second; } -namespace storage -{ std::ostream& operator<< (std::ostream& s, const Volume &v ) { @@ -2898,7 +2898,6 @@ return( s ); } -} string Volume::logDifference( const Volume& rhs ) const @@ -3113,3 +3112,5 @@ const string Volume::empty_string; const list<string> Volume::empty_slist; + +} -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org