diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-08-27 22:04:03 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-08-27 22:04:03 +0000 |
commit | c21f6d2d213e2abb698c1add1d1aba7549ab2de6 (patch) | |
tree | 15aa0679bf5bfb53e1a9aa697185608158fb8a2e /perl-install | |
parent | 01868d6bc05f8af773b5d4d50542b372a99ff528 (diff) | |
download | drakx-c21f6d2d213e2abb698c1add1d1aba7549ab2de6.tar drakx-c21f6d2d213e2abb698c1add1d1aba7549ab2de6.tar.gz drakx-c21f6d2d213e2abb698c1add1d1aba7549ab2de6.tar.bz2 drakx-c21f6d2d213e2abb698c1add1d1aba7549ab2de6.tar.xz drakx-c21f6d2d213e2abb698c1add1d1aba7549ab2de6.zip |
- do not handle clearall in read()
- ensure not partition table in written when "readonly" (it must not happen, but just in case)
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/partition_table.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 7efc3a45d..8ed9716a0 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -485,12 +485,8 @@ sub read_one($$) { { raw => $pt, extended => $extended[0], normal => \@normal, info => $info }; } -sub read($;$) { - my ($hd, $clearall) = @_; - if ($clearall) { - partition_table::raw::zero_MBR_and_dirty($hd); - return 1; - } +sub read { + my ($hd) = @_; my $pt = read_one($hd, 0) or return 0; $hd->{primary} = $pt; undef $hd->{extended}; @@ -554,6 +550,7 @@ sub read_extended { sub write { my ($hd) = @_; $hd->{isDirty} or return; + $hd->{readonly} and die "a read-only partition table should not be dirty!"; #- set first primary partition active if no primary partitions are marked as active. if (my @l = @{$hd->{primary}{raw}}) { |