diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 1 | ||||
-rw-r--r-- | perl-install/devices.pm | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 49a14c11d..062254dae 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -6,6 +6,7 @@ - do not crash when trying to create a partition on a device with no cylinder_size - use gtk instead of X to focus window +- fix two crashes on handling devices Version 12.40 - 22 July 2009 diff --git a/perl-install/devices.pm b/perl-install/devices.pm index b6764bdd4..f94362770 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -106,9 +106,11 @@ sub entry { "ttyS" => sub { c::S_IFCHR(), 4, 64 }, "ubd/" => sub { c::S_IFBLK(), 98, 0 }, "dm-" => sub { c::S_IFBLK(), get_dynamic_major('device-mapper'), 0 }, - }}{$prefix} or internal_error("unknown device $prefix $nb"); - ($type, $major, $minor) = $f->(); - $minor += $nb; + }}{$prefix}; + if($f) { + ($type, $major, $minor) = $f->(); + $minor += $nb; + } } unless ($type) { ($type, $major, $minor) = @@ -141,7 +143,7 @@ sub entry { "console" => [ c::S_IFCHR(), 5, 1 ], "systty" => [ c::S_IFCHR(), 4, 0 ], "lvm" => [ c::S_IFBLK(), 109, 0 ], - }}{$_} }; + }}{$_} || [] }; } # Lookup non listed devices in /sys unless ($type) { |