Author: aschnell
Date: Tue Aug 26 16:43:30 2008
New Revision: 50384
URL: http://svn.opensuse.org/viewcvs/yast?rev=50384&view=rev
Log:
- some cleanup
Modified:
trunk/storage/libstorage/src/AppUtil.cc
Modified: trunk/storage/libstorage/src/AppUtil.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AppUtil.cc?rev=50384&r1=50383&r2=50384&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AppUtil.cc (original)
+++ trunk/storage/libstorage/src/AppUtil.cc Tue Aug 26 16:43:30 2008
@@ -1,5 +1,5 @@
// Maintainer: fehr@suse.de
-/*
+/*
Textdomain "storage"
*/
@@ -130,7 +130,7 @@
checkNormalFile(string Path_Cv)
{
struct stat Stat_ri;
-
+
return (stat(Path_Cv.c_str(), &Stat_ri) >= 0 &&
S_ISREG(Stat_ri.st_mode));
}
@@ -183,7 +183,7 @@
return Ret_Ci;
}
-list<string> splitString( const string& s, const string& delChars,
+list<string> splitString( const string& s, const string& delChars,
bool multipleDelim, bool skipEmpty,
const string& quotes )
{
@@ -212,7 +212,7 @@
{
string::size_type qpos=s.find_first_of(quotes,cur);
string::size_type lpos=s.find_first_of(delChars,cur);
- if( qpos!=string::npos && qpos
+string
+mergeString(const list<string>& l, const string& del)
+{
+ return boost::join(l, del);
+}
+
+
+map
makeMap( const list<string>& l, const string& delim, const string& removeSur )
{
map ret;
@@ -448,10 +444,11 @@
if (readlink(full.c_str(), tmp) != -1)
{
string::size_type pos = tmp.find_last_of('/');
- if (pos == string::npos)
- links[entry->d_name] = tmp;
- else
+ if (pos != string::npos)
links[entry->d_name] = tmp.substr(pos + 1);
+ else
+ y2war("ignoring strange udev link \"" << entry->d_name <<
+ "\" -> \"" << tmp << "\" in \"" << path << "\"");
}
}
closedir(dir);
@@ -517,13 +514,15 @@
}
-int numSuffixes()
+int
+numSuffixes()
{
return 6;
}
-string getSuffix(int i, bool classic)
+string
+getSuffix(int i, bool classic)
{
switch (i)
{
@@ -556,8 +555,8 @@
}
-string byteToHumanString(unsigned long long size, bool classic, int precision,
- bool omit_zeroes)
+string
+byteToHumanString(unsigned long long size, bool classic, int precision, bool omit_zeroes)
{
const locale loc = classic ? locale::classic() : locale();
@@ -586,7 +585,8 @@
}
-bool humanStringToByte(const string& str, bool classic, unsigned long long& size)
+bool
+humanStringToByte(const string& str, bool classic, unsigned long long& size)
{
const locale loc = classic ? locale::classic() : locale();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org