From 651a256ee82c18578c3f551e89d3bcadaf68ab43 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 20 Sep 2004 09:46:40 +0000 Subject: - add field {part_number} for partitions (handle it in subpart_from_wild_device_name(), partition_table::read()) - create migrate_device_names() to handle the change of device names when changing kernel&modules (eg: hde->hda or hda->sda) - change prototype of install_any::use_root_part() (prefix is dropped, optional $in is added) - create fs::type::can_be_this_fs_type() and use it - create devices::part_number() and devices::part_prefix() and use them --- perl-install/devices.pm | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'perl-install/devices.pm') 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; -- cgit v1.2.1