diff options
Diffstat (limited to 'perl-install/devices.pm')
-rw-r--r-- | perl-install/devices.pm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/perl-install/devices.pm b/perl-install/devices.pm index 8a3654566..c7be884c2 100644 --- a/perl-install/devices.pm +++ b/perl-install/devices.pm @@ -239,4 +239,17 @@ sub from_devfs { undef; } +sub simple_partition_scan { + my ($part) = @_; + $part->{device} =~ /([hs]d[a-z])(\d+)$/; +} +sub part_number { + my ($part) = @_; + (simple_partition_scan($part))[1]; +} +sub part_prefix { + my ($part) = @_; + (simple_partition_scan($part))[0]; +} + 1; |