gparted r898 - in trunk: . src
- From: gedakc svn gnome org
- To: svn-commits-list gnome org
- Subject: gparted r898 - in trunk: . src
- Date: Fri, 12 Sep 2008 20:57:12 +0000 (UTC)
Author: gedakc
Date: Fri Sep 12 20:57:12 2008
New Revision: 898
URL: http://svn.gnome.org/viewvc/gparted?rev=898&view=rev
Log:
Added pattern recognition for HP RAID drives
Modified:
trunk/ChangeLog
trunk/src/GParted_Core.cc
Modified: trunk/src/GParted_Core.cc
==============================================================================
--- trunk/src/GParted_Core.cc (original)
+++ trunk/src/GParted_Core.cc Fri Sep 12 20:57:12 2008
@@ -136,6 +136,10 @@
{
device_paths .clear() ;
+ //Fixme: Remove code to read /proc/partitions when libparted bug 194 is fixed.
+ // This was a problem with no floppy drive yet BIOS indicated one existed.
+ // http://parted.alioth.debian.org/cgi-bin/trac.cgi/ticket/194
+ //
//try to find all available devices
std::ifstream proc_partitions( "/proc/partitions" ) ;
if ( proc_partitions )
@@ -145,9 +149,13 @@
std::string device ;
while ( getline( proc_partitions, line ) )
{
+ //Whole disk devices are the ones we want.
//Device names without a trailing digit refer to the whole disk.
- //These whole disk devices are the ones we want.
device = Utils::regexp_label(line, "^[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+([^0-9]+)$") ;
+ //Device names that end with a #[^p]# are HP Smart Array Devices (disks)
+ //E.g., device = /dev/cciss/c0d0, partition = /dev/cciss/c0d0p1
+ if ( device == "" )
+ device = Utils::regexp_label(line, "^[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+[0-9]+[\t ]+(.*[0-9]+[^p]{1}[0-9]+)$") ;
if ( device != "" )
{
//try to have libparted detect the device and add it to the list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]