diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-09-18 11:01:42 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-09-18 11:01:42 +0000 |
commit | c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5 (patch) | |
tree | 474f550e392cca3db22fc511e2ec4356b89954af | |
parent | 98654a20cbad80fc51a6a17cfa6f17ea2a0da93f (diff) | |
download | drakx-backup-do-not-use-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar drakx-backup-do-not-use-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar.gz drakx-backup-do-not-use-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar.bz2 drakx-backup-do-not-use-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar.xz drakx-backup-do-not-use-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.zip |
move more things from read() to read_primary()
-rw-r--r-- | perl-install/partition_table.pm | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 1d15d6ece..e9c192e09 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -249,19 +249,20 @@ sub read_primary { }; $@ or last; } - partition_table::raw::pt_info_to_primary($hd, $pt, $info); + my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info) or return; + $hd->{primary} = $primary; + undef $hd->{extended}; + verifyPrimary($primary); + 1; } sub read { my ($hd) = @_; - my $pt = read_primary($hd, 0) or return 0; - $hd->{primary} = $pt; - undef $hd->{extended}; - verifyPrimary($pt); + read_primary($hd) or return 0; eval { my $need_removing_empty_extended; - if ($pt->{extended}) { - read_extended($hd, $pt->{extended}, \$need_removing_empty_extended) or return 0; + if ($hd->{primary}{extended}) { + read_extended($hd, $hd->{primary}{extended}, \$need_removing_empty_extended) or return 0; } if ($need_removing_empty_extended) { #- special case when hda5 is empty, it must be skipped |