diff options
author | Pascal Terjan <pterjan@mandriva.org> | 2010-05-03 13:33:22 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mandriva.org> | 2010-05-03 13:33:22 +0000 |
commit | 035d7d1642de1e48515a619f16769dc8baf175f9 (patch) | |
tree | ae6380670ba294944f6181e501bf3165af9f3517 /perl-install/devices.pm | |
parent | af0799a629cca0a99a17c9342561e31c8809e5f0 (diff) | |
download | drakx-035d7d1642de1e48515a619f16769dc8baf175f9.tar drakx-035d7d1642de1e48515a619f16769dc8baf175f9.tar.gz drakx-035d7d1642de1e48515a619f16769dc8baf175f9.tar.bz2 drakx-035d7d1642de1e48515a619f16769dc8baf175f9.tar.xz drakx-035d7d1642de1e48515a619f16769dc8baf175f9.zip |
get major/minor of device mapper correctly now that they are links
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r-- | perl-install/devices.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm index a50d70953..719472cea 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -173,6 +173,16 @@ sub entry { } } } + # Try to access directly the device + # Now device mapper devices are links and do not appear in /proc or /sys + unless ($type) { + if (-e "/dev/$_") { + my (undef,undef,$mode,undef,undef,undef,$rdev,undef) = stat("/dev/$_"); + ($major, $minor) = unmakedev($rdev); + $type = $mode & c::S_IFMT(); + } + } + $type or internal_error("unknown device $_"); ($type, $major, $minor); } |