summaryrefslogtreecommitdiffstats
path: root/perl-install/devices.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-18 09:12:39 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-18 09:12:39 +0000
commitef348b1b6a172929aceeab109f9d5b96fa7f8cf8 (patch)
treea11b08a80b98e75ffd018282748d390b5acd513e /perl-install/devices.pm
parent32591a85e1da6a37178d5486c92216c8ef3bd632 (diff)
downloaddrakx-ef348b1b6a172929aceeab109f9d5b96fa7f8cf8.tar
drakx-ef348b1b6a172929aceeab109f9d5b96fa7f8cf8.tar.gz
drakx-ef348b1b6a172929aceeab109f9d5b96fa7f8cf8.tar.bz2
drakx-ef348b1b6a172929aceeab109f9d5b96fa7f8cf8.tar.xz
drakx-ef348b1b6a172929aceeab109f9d5b96fa7f8cf8.zip
(entry) use sysfs in order to discover major/minor for SCSI like
devices since they're dynamic with kernel-2.6.28+
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r--perl-install/devices.pm5
1 files changed, 2 insertions, 3 deletions
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) =