summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/devices.pm4
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;