summaryrefslogtreecommitdiffstats
path: root/perl-install/fs.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/fs.pm')
-rw-r--r--perl-install/fs.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/fs.pm b/perl-install/fs.pm
index 8d76939b8..2f8eb0057 100644
--- a/perl-install/fs.pm
+++ b/perl-install/fs.pm
@@ -157,8 +157,14 @@ sub subpart_from_wild_device_name {
}
$dev =~ s!/(tmp|u?dev)/!!;
- my $is_devfs = $dev =~ m!/(disc|part\d+)$!;
- $part{$is_devfs ? 'devfs_device' : 'device'} = $dev;
+ if (my ($is_devfs, $part_number) = $dev =~ m!/(disc|part(\d+))$!) {
+ $part{part_number} = $part_number if $part_number;
+ $part{devfs_device} = $dev;
+ } else {
+ $part{device} = $dev;
+ my $part_number = devices::part_number(\%part);
+ $part{part_number} = $part_number if $part_number;
+ }
return \%part;
} elsif ($dev =~ m!^/! && -f "$::prefix$dev") {
#- loopback file