Author: aschnell
Date: Wed Apr 1 16:55:29 2009
New Revision: 56544
URL: http://svn.opensuse.org/viewcvs/yast?rev=56544&view=rev
Log:
- templated programming
Modified:
trunk/storage/libstorage/src/Dasd.cc
trunk/storage/libstorage/src/Disk.cc
trunk/storage/libstorage/src/ProcPart.cc
trunk/storage/libstorage/src/ProcPart.h
Modified: trunk/storage/libstorage/src/Dasd.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Dasd.cc?rev=56544&r1=56543&r2=56544&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Dasd.cc (original)
+++ trunk/storage/libstorage/src/Dasd.cc Wed Apr 1 16:55:29 2009
@@ -199,9 +199,9 @@
if( !reg.empty() && reg.find( '/' )!=string::npos &&
isdigit(reg[reg.length()-1]) )
reg += "p";
- reg += "[0-9]+";
- list<string> ps = ppart.getMatchingEntries( reg );
- y2mil("regex " << reg << " ps " << ps);
+ reg = "^" + reg + "[0-9]+" "$";
+ list<string> ps = ppart.getMatchingEntries(regex_matches(reg));
+ y2mil("regex:\"" << reg << "\" ps:" << ps);
unsigned long dummy = 0;
if( !checkPartedValid( ppart, nm, pl, dummy ) )
{
Modified: trunk/storage/libstorage/src/Disk.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=56544&r1=56543&r2=56544&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Disk.cc (original)
+++ trunk/storage/libstorage/src/Disk.cc Wed Apr 1 16:55:29 2009
@@ -872,9 +872,9 @@
if( !reg.empty() && reg.find( '/' )!=string::npos &&
isdigit(reg[reg.length()-1]) )
reg += "p";
- reg += "[0-9]+";
- list<string> ps = pp.getMatchingEntries( reg );
- y2mil("regex " << reg << " ps " << ps);
+ reg = "^" + reg + "[0-9]+" "$";
+ list<string> ps = pp.getMatchingEntries(regex_matches(reg));
+ y2mil("regex:\"" << reg << "\" ps:" << ps);
for( list<string>::const_iterator i=ps.begin(); i!=ps.end(); i++ )
{
pair