diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-10-19 15:11:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-10-19 15:11:54 +0000 |
commit | 75298521ee120412992df31ddd9f02338ff199fb (patch) | |
tree | 3677ce7107c9c78b234dc67dd431c5177cd630ee /perl-install | |
parent | dfb93ec9c0e54c5401b905590715f258a0811f25 (diff) | |
download | drakx-backup-do-not-use-75298521ee120412992df31ddd9f02338ff199fb.tar drakx-backup-do-not-use-75298521ee120412992df31ddd9f02338ff199fb.tar.gz drakx-backup-do-not-use-75298521ee120412992df31ddd9f02338ff199fb.tar.bz2 drakx-backup-do-not-use-75298521ee120412992df31ddd9f02338ff199fb.tar.xz drakx-backup-do-not-use-75298521ee120412992df31ddd9f02338ff199fb.zip |
fix ending is last sector, not next one
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/partition_table_gpt.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/partition_table_gpt.pm b/perl-install/partition_table_gpt.pm index 134389cd8..3f30da4b9 100644 --- a/perl-install/partition_table_gpt.pm +++ b/perl-install/partition_table_gpt.pm @@ -110,7 +110,7 @@ sub read_partitionEntries { map { 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}; + $h{size} = $h{ending} - $h{start} + 1; $h{type} = $gpt_types_rev{$h{gpt_type}}; $h{type} = 0x100 if !defined $h{type}; \%h; @@ -146,7 +146,7 @@ sub write { my ($hd, $sector, $pt, $info) = @_; foreach (@$pt) { - $_->{ending} = $_->{start} + $_->{size}; + $_->{ending} = $_->{start} + $_->{size} - 1; $_->{guid} ||= 'TODO'; $_->{gpt_type} = $gpt_types{$_->{type}} || $_->{gpt_type} || $gpt_types{0x83}; } |