summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm
index 9346b687e..ac72bc3ed 100644
--- a/perl-install/devices.pm
+++ b/perl-install/devices.pm
@@ -47,10 +47,10 @@ sub make($) {
-e $file and return $file; # assume nobody takes fun at creating files named as device
- if (/^sd(.)(\d\d)/) {
+ if (/^sd(.)(\d{0,2})/) {
$type = c::S_IFBLK();
$major = 8;
- $minor = ord($1) - ord('a') + $2;
+ $minor = ord($1) - ord('a') + ($2 || 0);
} elsif (/^hd(.)(\d{0,2})/) {
$type = c::S_IFBLK();
($major, $minor) =