diff options
Diffstat (limited to 'perl-install/partition_table/raw.pm')
-rw-r--r-- | perl-install/partition_table/raw.pm | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index 612647e60..453a19c6c 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -1,4 +1,4 @@ -package partition_table::raw; # $Id: raw.pm 266069 2010-02-09 19:47:35Z pterjan $ +package partition_table::raw; use diagnostics; use strict; @@ -11,10 +11,6 @@ use log; use c; my @MBR_signatures = ( -if_(arch() =~ /ppc/, - (map { [ 'yaboot', 0, "PM", 0x200 * $_ + 0x10, "bootstrap\0" ] } 0 .. 61), #- "PM" is a Partition Map - [ 'yaboot', 0x400, "BD", 0x424, "\011bootstrap" ], #- "BD" is a HFS filesystem -), [ 'empty', 0, "\0\0\0\0" ], [ 'grub', 0, "\xEBG", 0x17d, "stage1 \0" ], [ 'grub', 0, "\xEBH", 0x17e, "stage1 \0" ], @@ -230,23 +226,25 @@ sub raw_add { sub zero_MBR { &partition_table::initialize } #- deprecated -sub clear_existing { - my ($hd) = @_; - my @parts = (partition_table::get_normal_parts($hd), if_($hd->{primary}{extended}, $hd->{primary}{extended})); - partition_table::will_tell_kernel($hd, del => $_) foreach @parts; -} - #- deprecated sub zero_MBR_and_dirty { my ($hd) = @_; fsedit::partition_table_clear_and_initialize([], $hd); } +#- by default, we assume the kernel doesn't automatically reread partition table: +sub need_to_tell_kernel { + my ($_hd) = @_; + 1; +} + sub read_primary { my ($hd) = @_; - my ($pt, $info) = eval { $hd->read_one(0) } or return; + my ($pt, $info) = eval { $hd->read_one(0) }; + $pt or return; my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info); + $primary->{is_hybrid_iso} = $hd->{current_pt_table_type} eq 'dos' && $hd->{fs_type_from_magic} eq 'iso9660'; $hd->{primary} = $primary; undef $hd->{extended}; partition_table::verifyPrimary($primary); @@ -298,4 +296,14 @@ A test to check the integrity of data has failed. It means writing anything on the disk will end up with random, corrupted data."); } +sub start_write { + my ($_hd) = @_; + 1; +} + +sub end_write { + my ($_hd, $_handle) = @_; + 1; +} + 1; |