Author: aschnell
Date: Tue Aug 19 22:10:28 2008
New Revision: 50218
URL: http://svn.opensuse.org/viewcvs/yast?rev=50218&view=rev
Log:
- cleanup
Modified:
trunk/storage/libstorage/src/Dm.cc
trunk/storage/libstorage/src/DmPartCo.h
trunk/storage/libstorage/src/Storage.cc
trunk/storage/libstorage/src/Storage.h
trunk/storage/libstorage/src/StorageDefines.h
trunk/storage/libstorage/src/Volume.cc
Modified: trunk/storage/libstorage/src/Dm.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dm.cc?rev=50218&r1=50217&r2=50218&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Dm.cc (original)
+++ trunk/storage/libstorage/src/Dm.cc Tue Aug 19 22:10:28 2008
@@ -510,7 +510,7 @@
string Dm::sysfsPath() const
{
- string ret = Storage::sysfsDir() + "/";
+ string ret = SYSFSDIR "/";
list<string>::const_iterator i =
find_if( alt_names.begin(), alt_names.end(), find_begin( "/dev/dm-" ) );
if( i != alt_names.end() )
Modified: trunk/storage/libstorage/src/DmPartCo.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/DmPartCo.h?rev=50218&r1=50217&r2=50218&view=diff
==============================================================================
--- trunk/storage/libstorage/src/DmPartCo.h (original)
+++ trunk/storage/libstorage/src/DmPartCo.h Tue Aug 19 22:10:28 2008
@@ -170,7 +170,6 @@
string udev_path;
std::list<string> udev_id;
string logfile_name;
- string sysfs_dir;
Disk* disk;
bool active;
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=50218&r1=50217&r2=50218&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Tue Aug 19 22:10:28 2008
@@ -203,6 +203,7 @@
detectObjects();
setCacheChanges( true );
dumpObjectList();
+
std::list >::const_iterator i;
for( i=infoPopupTxts.begin(); i!=infoPopupTxts.end(); ++i )
{
@@ -681,7 +682,7 @@
}
}
if( d &&
- (d->getSysfsInfo( sysfs_dir+"/"+data.name )||data.typ==DiskData::XEN) &&
+ (d->getSysfsInfo(SYSFSDIR "/" + data.name)||data.typ==DiskData::XEN) &&
(data.typ==DiskData::XEN||d->detect(pp)))
{
if( max_log_num>0 )
@@ -699,7 +700,7 @@
{
DIR *Dir;
struct dirent *Entry;
- if( (Dir=opendir( sysfs_dir.c_str() ))!=NULL )
+ if( (Dir=opendir(SYSFSDIR))!=NULL )
{
map by_path;
map by_id;
@@ -710,10 +711,10 @@
{
int Range=0;
unsigned long long Size = 0;
- string SysfsDir = sysfs_dir+"/"+Entry->d_name;
- string SysfsFile = SysfsDir+"/range";
- y2milestone( "autodetectDisks sysfsdir:%s", SysfsDir.c_str() );
- y2mil( "autodetectDisks Range access:" << access( SysfsFile.c_str(), R_OK ) );
+ string SysfsDir = string(SYSFSDIR "/") + Entry->d_name;
+ string SysfsFile = SysfsDir + "/range";
+ y2mil("autodetectDisks sysfsdir:" << SysfsDir);
+ y2mil("autodetectDisks Range access:" << access(SysfsFile.c_str(), R_OK));
if( access( SysfsFile.c_str(), R_OK )==0 )
{
ifstream File( SysfsFile.c_str() );
@@ -775,7 +776,7 @@
}
else
{
- y2warning( "Failed to open:%s", sysfs_dir.c_str() );
+ y2war("Failed to open:" SYSFSDIR);
}
}
@@ -956,7 +957,6 @@
}
string Storage::proc_arch;
-string Storage::sysfs_dir = "/sys/block";
bool Storage::is_ppc_mac = false;
bool Storage::is_ppc_pegasos = false;
Modified: trunk/storage/libstorage/src/Storage.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.h?rev=50218&r1=50217&r2=50218&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.h (original)
+++ trunk/storage/libstorage/src/Storage.h Tue Aug 19 22:10:28 2008
@@ -222,7 +222,6 @@
string prependRoot(const string& mp) const;
const string& tmpDir() const;
static const string& arch() { return( proc_arch ); }
- static const string& sysfsDir() { return( sysfs_dir ); }
static bool isPPCMac() { return( is_ppc_mac ); }
static bool isPPCPegasos() { return( is_ppc_pegasos ); }
EtcFstab* getFstab() { return fstab; }
@@ -1724,7 +1723,6 @@
string logdir;
unsigned hald_pid;
static string proc_arch;
- static string sysfs_dir;
static bool is_ppc_mac;
static bool is_ppc_pegasos;
CCont cont;
Modified: trunk/storage/libstorage/src/StorageDefines.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/StorageDefines.h?rev=50218&r1=50217&r2=50218&view=diff
==============================================================================
--- trunk/storage/libstorage/src/StorageDefines.h (original)
+++ trunk/storage/libstorage/src/StorageDefines.h Tue Aug 19 22:10:28 2008
@@ -2,6 +2,9 @@
#define STORAGE_DEFINES_H
+#define SYSFSDIR "/sys/block"
+
+
#define PARTEDBIN "/usr/sbin/parted"
#define PARTEDCMD PARTEDBIN " -s " // blank at end !!
Modified: trunk/storage/libstorage/src/Volume.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Volume.cc?rev=50218&r1=50217&r2=50218&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Volume.cc (original)
+++ trunk/storage/libstorage/src/Volume.cc Tue Aug 19 22:10:28 2008
@@ -885,7 +885,7 @@
string Volume::sysfsPath() const
{
- string ret = Storage::sysfsDir() + "/";
+ string ret = SYSFSDIR "/";
string::size_type pos = dev.rfind( '/' ) + 1;
ret += dev.substr( pos );
y2mil( "ret:" << ret );
@@ -897,7 +897,7 @@
string ret;
if( is_loop )
{
- ret = Storage::sysfsDir() + "/";
+ ret = SYSFSDIR "/";
string::size_type pos = loop_dev.rfind( '/' ) + 1;
ret += loop_dev.substr( pos );
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org