Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54438 - /trunk/storage/libstorage/src/Disk.cc
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Wed, 07 Jan 2009 15:14:26 -0000
  • Message-id: <E1LKa70-0006Xr-Ki@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Wed Jan 7 16:14:26 2009
New Revision: 54438

URL: http://svn.opensuse.org/viewcvs/yast?rev=54438&view=rev
Log:
- use std::list::remove_if instead of std::remove_if
- use std::partition

Modified:
trunk/storage/libstorage/src/Disk.cc

Modified: trunk/storage/libstorage/src/Disk.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/storage/libstorage/src/Disk.cc?rev=54438&r1=54437&r2=54438&view=diff
==============================================================================
--- trunk/storage/libstorage/src/Disk.cc (original)
+++ trunk/storage/libstorage/src/Disk.cc Wed Jan 7 16:14:26 2009
@@ -6,7 +6,7 @@
#include <sys/mount.h> /* for BLKGETSIZE */
#include <linux/hdreg.h> /* for HDIO_GETGEO */

-#include <iostream>
+#include <ostream>
#include <string>
#include <sstream>
#include <iomanip>
@@ -188,19 +188,8 @@
y2mil("disk:" << nm << " path:" << path << "id:" << id);
udev_path = path;
udev_id = id;
-
- udev_id.erase(remove_if(udev_id.begin(), udev_id.end(),
find_begin("edd-")), udev_id.end());
-
- if( udev_id.size()>1 )
- {
- list<string>::iterator i = find_if( udev_id.begin(), udev_id.end(),
find_begin( "ata-" ) );
- if( i!=udev_id.end() && i!=udev_id.begin() )
- {
- string tmp = *i;
- udev_id.erase( i );
- udev_id.push_front(tmp);
- }
- }
+ udev_id.remove_if(find_begin("edd-"));
+ partition(udev_id.begin(), udev_id.end(), find_begin("ata-"));
y2mil("id:" << udev_id);

PartPair pp = partPair();

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages