From 2061f680fcdd4edadd729b24f1ca26c420eb3947 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 14 Aug 2001 21:47:26 +0000 Subject: add number-only device-name handling (eg: "801" is "sda1") --- perl-install/devices.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'perl-install') diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 16d95a8ac..be1ece13f 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -52,7 +52,10 @@ sub entry { my ($type, $major, $minor); local ($_) = @_; - if (/^sd(.)(\d{0,2})/) { + if (/^([\da-f]{3,4})$/i) { + $type = c::S_IFBLK(); + ($major, $minor) = unmakedev(hex $1); + } elsif (/^sd(.)(\d{0,2})/) { $type = c::S_IFBLK(); $major = 8; $minor = 16 * (ord($1) - ord('a')) + ($2 || 0); -- cgit v1.2.1