From ef348b1b6a172929aceeab109f9d5b96fa7f8cf8 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 18 Dec 2008 09:12:39 +0000 Subject: (entry) use sysfs in order to discover major/minor for SCSI like devices since they're dynamic with kernel-2.6.28+ --- perl-install/devices.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'perl-install/devices.pm') diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 6b091be27..515f9c210 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -77,10 +77,9 @@ sub entry { if (/^0x([\da-f]{3,4})$/i) { $type = c::S_IFBLK(); ($major, $minor) = unmakedev(hex $1); - } elsif (/^sd(.)(\d{0,2})/) { + } elsif (/^(sd.)(\d{0,2})/) { + ($major, $minor) = split(':', chomp_(cat_("/sys/block/$1/$1$2/dev"))); $type = c::S_IFBLK(); - $major = 8; - $minor = 16 * (ord($1) - ord('a')) + ($2 || 0); } elsif (/^hd(.)(\d{0,2})/) { $type = c::S_IFBLK(); ($major, $minor) = -- cgit v1.2.1