summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>1999-10-19 21:15:19 +0000
committerPascal Rigaux <pixel@mandriva.com>1999-10-19 21:15:19 +0000
commitcb3a724322078e12b09832edc9a61cb7d225b414 (patch)
tree0a8a4a024d45fecc2ec0838de8686604d4333f30 /perl-install
parentdba7d6225b48096fb2831bf36179123b16c67575 (diff)
downloaddrakx-backup-do-not-use-cb3a724322078e12b09832edc9a61cb7d225b414.tar
drakx-backup-do-not-use-cb3a724322078e12b09832edc9a61cb7d225b414.tar.gz
drakx-backup-do-not-use-cb3a724322078e12b09832edc9a61cb7d225b414.tar.bz2
drakx-backup-do-not-use-cb3a724322078e12b09832edc9a61cb7d225b414.tar.xz
drakx-backup-do-not-use-cb3a724322078e12b09832edc9a61cb7d225b414.zip
no_comment
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/partition_table.pm7
1 files changed, 5 insertions, 2 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm
index 6ad004814..7107f4345 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -85,10 +85,13 @@ my %fs2type = reverse %type2fs;
sub important_types { $_[0] and return sort values %types; @important_types }
-sub type2name($) { $types{$_[0]} || 'unknown' }
+sub type2name($) { $types{$_[0]} || $_[0] }
sub type2fs($) { $type2fs{$_[0]} }
-sub name2type($) { $types_rev{$_[0]} }
sub fs2type($) { $fs2type{$_[0]} }
+sub name2type($) {
+ local ($_) = @_;
+ /0x(.*)/ ? hex $1 : $types_rev{$_} || $_;
+}
sub isExtended($) { $_[0]{type} == 5 || $_[0]{type} == 0xf }
sub isSwap($) { $type2fs{$_[0]{type}} eq 'swap' }