[Fai-commit] r4860 - people/michael/features/setup_harddisks_2/implementation/lib

mt at alioth.debian.org mt at alioth.debian.org
Tue Apr 8 15:36:31 UTC 2008


Author: mt
Date: 2008-04-08 15:36:30 +0000 (Tue, 08 Apr 2008)
New Revision: 4860

Modified:
   people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm
Log:
support cciss et al. as well in size estimation


Modified: people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm
===================================================================
--- people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm	2008-04-08 15:30:31 UTC (rev 4859)
+++ people/michael/features/setup_harddisks_2/implementation/lib/sizes.pm	2008-04-08 15:36:30 UTC (rev 4860)
@@ -95,7 +95,7 @@
   # try the entire disk first; we then use the data from the current
   # configuration; this matches in fact for than the allowable strings, but
   # this should be caught later on
-  if ($dev =~ /^\/dev\/[sh]d[a-z]$/) {
+  if ($dev =~ m{^/dev/(i2o/hd[a-t]|cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d|sd[a-t]|hd[a-t])$}) {
     defined ($FAI::current_config{$dev}{end_byte})
       or die "$dev is not a valid block device\n";
 
@@ -105,7 +105,7 @@
   }
 
   # try a partition
-  elsif ($dev =~ /^(\/dev\/[sh]d[a-z])(\d+)$/) {
+  elsif ($dev =~ m{^/dev/(i2o/hd[a-t]|cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d|sd[a-t]|hd[a-t])p?(\d+)$}) {
 
     # the size is configured, return it
     defined ($FAI::configs{"PHY_$1"}{partitions}{$2}{size}{eff_size})




More information about the Fai-commit mailing list