From cb3a724322078e12b09832edc9a61cb7d225b414 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 19 Oct 1999 21:15:19 +0000 Subject: no_comment --- perl-install/partition_table.pm | 7 +++++-- 1 file 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' } -- cgit v1.2.1