Author: aschnell
Date: Mon Aug 18 20:34:41 2008
New Revision: 50190
URL: http://svn.opensuse.org/viewcvs/yast?rev=50190&view=rev
Log:
- cleanup
Modified:
trunk/storage/libstorage/src/Region.h
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/StorageDefines.h
Modified: trunk/storage/libstorage/src/Region.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Region.h?rev=50190&r1=50189&r2=50190&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Region.h (original)
+++ trunk/storage/libstorage/src/Region.h Mon Aug 18 20:34:41 2008
@@ -9,8 +9,8 @@
class Region
{
public:
- Region() : s(0), l(0) {};
- Region( unsigned long start, unsigned long len ) : s(start), l(len) {};
+ Region() : s(0), l(0) {}
+ Region( unsigned long start, unsigned long len ) : s(start), l(len) {}
Region( const Region& x )
{ *this = x; }
Region& operator=(const Region& r)
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=50190&r1=50189&r2=50190&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Mon Aug 18 20:34:41 2008
@@ -2844,10 +2844,6 @@
{
ret = STORAGE_LVM_VG_NOT_FOUND;
}
- if (ret == 0)
- {
- ret = checkCache();
- }
y2mil("ret:" << ret);
return ret;
}
@@ -5734,21 +5730,21 @@
extendedError = txt;
}
+
int Storage::waitForDevice() const
- {
+{
int ret = 0;
- const char * prog = "/sbin/udevsettle";
- if( access( prog, X_OK )==0 )
- {
- string cmd( prog );
- cmd += " --timeout=20";
- y2milestone( "calling prog:%s", cmd.c_str() );
- SystemCmd c( cmd );
- y2milestone( "returned prog:%s retcode:%d", cmd.c_str(), c.retcode() );
- }
- y2milestone( "ret:%d", ret );
- return( ret );
+ if (access(UDEVSETTLEBIN, X_OK) == 0)
+ {
+ string cmd(UDEVSETTLEBIN " --timeout=20");
+ y2mil("calling prog:" << cmd);
+ SystemCmd c(cmd);
+ y2mil("returned prog:" << cmd << " retcode:" << c.retcode());
}
+ y2mil("ret:" << ret);
+ return ret;
+}
+
int Storage::waitForDevice( const string& device ) const
{
@@ -5773,21 +5769,21 @@
return( ret );
}
+
void Storage::checkDeviceExclusive( const string& device, unsigned secs )
- {
+{
const int delay = 50000;
- unsigned count = secs * 1000000/delay;
- int fd;
+ const unsigned count = secs * 1000000/delay;
y2mil( "dev:" << device << " sec:" << secs << " count:" << count );
for( unsigned i=0; i