summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-18 11:01:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-18 11:01:42 +0000
commitc5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5 (patch)
tree474f550e392cca3db22fc511e2ec4356b89954af
parent98654a20cbad80fc51a6a17cfa6f17ea2a0da93f (diff)
downloaddrakx-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar
drakx-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar.gz
drakx-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar.bz2
drakx-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.tar.xz
drakx-c5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5.zip
move more things from read() to read_primary()
-rw-r--r--perl-install/partition_table.pm15
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