From 0306ad0100b9d40606d723706f909438a27dfac1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 27 Jul 2004 10:31:34 +0000 Subject: - add field {fs_type} partially replacing {pt_type} {pt_type} is always a number, {fs_type} is always a string - introduce set_isFormatted() (to ensure {notFormatted} but also {fs_type_from_magic} and {bad_fs_type_magic} are updated) - don't use 0x483 for ext3 anymore (same for reiserfs...), the type_name gives both a pt_type and a fs_type - many accessors from partition_table removed (type2fs(), fs2pt_type()) - remove isThisFs() (not useful anymore since we can use directly {fs_type}) - remove isFat() (inline the function) - other isXXX() from partition_table are moved to fs::type - part2name() is now fs::type::part2type_name - name2pt_type() is now fs::type::type_name2subpart() - partition_table::important_types() is now fs::type::type_names() - fsedit::typeOfPart() is now fs::type::fs_type_from_magic() - no need to truncate type_name since they are shorter --- perl-install/partition_table/gpt.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/partition_table/gpt.pm') diff --git a/perl-install/partition_table/gpt.pm b/perl-install/partition_table/gpt.pm index 2f1506bbd..423d73a7a 100644 --- a/perl-install/partition_table/gpt.pm +++ b/perl-install/partition_table/gpt.pm @@ -130,8 +130,8 @@ sub read_partitionEntries { sysread $F, $tmp, psizeof($partitionEntry_format) or die "error while reading partition table in sector $info->{partitionEntriesLBA}"; my %h; @h{@$partitionEntry_fields} = unpack $partitionEntry_format, $tmp; $h{size} = $h{ending} - $h{start} + 1; - $h{pt_type} = $gpt_types_rev{$h{gpt_type}}; - $h{pt_type} = 0x100 if !defined $h{pt_type}; + my $pt_type = $gpt_types_rev{$h{gpt_type}}; + fs::type::set_pt_type(\%h, defined $pt_type ? $pt_type : 0x100); \%h; } (1 .. $info->{nbPartitions}); \@pt; -- cgit v1.2.1