diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2003-06-24 10:31:48 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2003-06-24 10:31:48 +0000 |
commit | 6e304d54d7c7fcc7d89fda21addbdcbb21e8993d (patch) | |
tree | f3bdbb67da9a72595fe6b5ca1803a1309b6059c5 /perl-install | |
parent | 007b9e3d68ced086a6c23ce78b6583eabec229a0 (diff) | |
download | drakx-backup-do-not-use-6e304d54d7c7fcc7d89fda21addbdcbb21e8993d.tar drakx-backup-do-not-use-6e304d54d7c7fcc7d89fda21addbdcbb21e8993d.tar.gz drakx-backup-do-not-use-6e304d54d7c7fcc7d89fda21addbdcbb21e8993d.tar.bz2 drakx-backup-do-not-use-6e304d54d7c7fcc7d89fda21addbdcbb21e8993d.tar.xz drakx-backup-do-not-use-6e304d54d7c7fcc7d89fda21addbdcbb21e8993d.zip |
(from_devfs)
- handle read_proc_partitions_raw() / find() faillures
- return undef when we failled to find out real device
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/devices.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm index c4b6126ce..b2b44aec7 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -229,8 +229,10 @@ sub from_devfs { $dev = "/dev/" . $dev; if (-e $dev) { my ($major, $minor) = unmakedev((stat($dev))[6]); - (find { $_->{major} == $major && $_->{minor} == $minor } read_proc_partitions_raw())->{dev}; + my $r = find { $_->{major} == $major && $_->{minor} == $minor } read_proc_partitions_raw(); + $r and return $r->{dev}; } + undef; } 1; |