Author: aschnell
Date: Mon Apr 20 13:50:39 2009
New Revision: 56852
URL: http://svn.opensuse.org/viewcvs/yast?rev=56852&view=rev
Log:
- fixed generation of disk_* files (bnc #492452)
Modified:
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/Storage.h
trunk/storage/package/yast2-storage.changes
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=56852&r1=56851&r2=56852&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Mon Apr 20 13:50:39 2009
@@ -248,6 +248,7 @@
if( !instsys() )
detectNfs( pm );
detectFsData( vBegin(), vEnd(), pm );
+ logContainersAndVolumes(logdir);
}
if( instsys() )
@@ -277,14 +278,7 @@
Storage::~Storage()
{
- if( max_log_num>0 )
- {
- logVolumes( logdir );
- for (CCIter i = cont.begin(); i != cont.end(); ++i)
- {
- (*i)->logData( logdir );
- }
- }
+ logContainersAndVolumes(logdir);
deleteClist(cont);
deleteBackups();
if( !tempdir.empty() && access( tempdir.c_str(), R_OK )==0 )
@@ -649,8 +643,6 @@
(d->getSysfsInfo(SYSFSDIR "/" + data.name)||data.typ==DiskData::XEN) &&
(data.typ==DiskData::XEN||d->detect(pp)))
{
- if( max_log_num>0 )
- d->logData( logdir );
data.d = d;
}
else if( d )
@@ -774,8 +766,6 @@
i->getStartData();
}
}
- if( max_log_num>0 )
- logVolumes( logdir );
y2mil("detectFsData end");
}
@@ -818,6 +808,19 @@
}
+ void
+ Storage::logContainersAndVolumes(const string& Dir) const
+ {
+ if (max_log_num > 0)
+ {
+ for (CCIter i = cont.begin(); i != cont.end(); ++i)
+ (*i)->logData(Dir);
+
+ logVolumes(Dir);
+ }
+ }
+
+
void
Storage::logVolumes(const string& Dir) const
{
Modified: trunk/storage/libstorage/src/Storage.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?rev=56852&r1=56851&r2=56852&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.h (original)
+++ trunk/storage/libstorage/src/Storage.h Mon Apr 20 13:50:39 2009
@@ -1685,6 +1685,7 @@
bool haveNfs( NfsCo*& co );
bool haveLoop( LoopCo*& loop );
int removeContainer( Container* val );
+ void logContainersAndVolumes(const string& Dir) const;
void logVolumes(const string& Dir) const;
int commitPair( CPair& p, bool (* fnc)( const Container& ) );
void sortCommitLists(storage::CommitStage stage, list