Author: aschnell
Date: Thu Mar 5 17:15:30 2009
New Revision: 55946
URL: http://svn.opensuse.org/viewcvs/yast?rev=55946&view=rev
Log:
- removed parameter that was never really used
Modified:
trunk/storage/libstorage/src/AsciiFile.cc
trunk/storage/libstorage/src/AsciiFile.h
trunk/storage/libstorage/src/EtcFstab.cc
trunk/storage/libstorage/src/Storage.cc
Modified: trunk/storage/libstorage/src/AsciiFile.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AsciiFile.cc?rev=55946&r1=55945&r2=55946&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AsciiFile.cc (original)
+++ trunk/storage/libstorage/src/AsciiFile.cc Thu Mar 5 17:15:30 2009
@@ -314,9 +314,9 @@
return Lines_C[Idx_iv];
}
-int AsciiFile::find( unsigned Start_iv, Regex& Pat_Cv ) const
+int AsciiFile::find( Regex& Pat_Cv ) const
{
- unsigned Idx_ii = Start_iv;
+ unsigned Idx_ii = 0;
int Ret_ii = -1;
while( Ret_ii<0 && Idx_ii0 && Pat_Ci[0]=='^';
Modified: trunk/storage/libstorage/src/AsciiFile.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/AsciiFile.h?rev=55946&r1=55945&r2=55946&view=diff
==============================================================================
--- trunk/storage/libstorage/src/AsciiFile.h (original)
+++ trunk/storage/libstorage/src/AsciiFile.h Thu Mar 5 17:15:30 2009
@@ -49,8 +49,8 @@
const string& operator []( unsigned int Index_iv ) const;
string& operator []( unsigned int Index_iv );
- int find( unsigned int Start_iv, const string& Pat_Cv ) const;
- int find( unsigned int Start_iv, Regex& Pat_Cv ) const;
+ int find( const string& Pat_Cv ) const;
+ int find( Regex& Pat_Cv ) const;
unsigned numLines() const { return Lines_C.size(); }
Modified: trunk/storage/libstorage/src/EtcFstab.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/EtcFstab.cc?rev=55946&r1=55945&r2=55946&view=diff
==============================================================================
--- trunk/storage/libstorage/src/EtcFstab.cc (original)
+++ trunk/storage/libstorage/src/EtcFstab.cc Thu Mar 5 17:15:30 2009
@@ -419,7 +419,7 @@
ret = fstab;
fi = new Regex( "^[ \t]*" + e.dentry + "[ \t]" );
}
- lineno = ret->find( 0, *fi );
+ lineno = ret->find( *fi );
delete fi;
y2mil("fstab:" << fstab << " cryptotab:" << cryptotab << " lineno:" << lineno);
return( ret );
@@ -437,7 +437,7 @@
if( mount.length()>0 && mount[mount.length()-1] != '/' )
reg += "/";
Regex *fi = new Regex( reg );
- int lineno = tab.find( 0, *fi );
+ int lineno = tab.find( *fi );
delete fi;
y2mil("reg:" << reg << " lineno:" << lineno);
return( lineno );
@@ -449,12 +449,12 @@
y2mil("dev:" << e.device);
string reg = "^[ \t]*[^ \t]+[ \t]+" + e.device + "[ \t]";
Regex fi( reg );
- lineno = tab.find( 0, fi );
+ lineno = tab.find( fi );
if( lineno<0 )
{
reg = "^[ \t]*" + e.dentry + "[ \t]";
Regex fil( reg );
- lineno = tab.find( 0, fil );
+ lineno = tab.find( fil );
}
y2mil("reg:" << reg << " lineno:" << lineno);
return( lineno>=0 );
@@ -466,7 +466,7 @@
y2mil("dev:" << dev.c_str());
string reg = "^[ \t]*[^ \t]+[ \t]+" + dev + "[ \t]";
Regex fi( reg );
- lineno = tab.find( 0, fi );
+ lineno = tab.find( fi );
y2mil("reg:" << reg << " lineno:" << lineno);
return( lineno>=0 );
}
Modified: trunk/storage/libstorage/src/Storage.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Storage.cc?rev=55946&r1=55945&r2=55946&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Storage.cc (original)
+++ trunk/storage/libstorage/src/Storage.cc Thu Mar 5 17:15:30 2009
@@ -136,7 +136,7 @@
{
AsciiFile sc( "/etc/sysconfig/storage" );
Regex r('^' + Regex::ws + "DEVICE_NAMES" + '=' + "(['\"]?)([^'\"]*)\\1" + Regex::ws + '$');
- int line = sc.find( 0, r );
+ int line = sc.find( r );
if( line >= 0 )
{
string val = boost::to_lower_copy(r.cap(2), locale::classic());
@@ -340,7 +340,7 @@
if( proc_arch == "ppc" )
{
AsciiFile cpu( "/proc/cpuinfo" );
- int l = cpu.find( 0, "^machine\t" );
+ int l = cpu.find( "^machine\t" );
y2mil("line:" << l);
if( l >= 0 )
{
@@ -813,7 +813,7 @@
for( VolIterator i=begin; i!=end; ++i )
{
int pos = -1;
- if( (pos=vd.find( 0, "^"+i->device()+" " ))>=0 )
+ if( (pos=vd.find( "^"+i->device()+" " ))>=0 )
{
i->getTestmodeData( vd[pos] );
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org