summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table/raw.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-09-18 11:06:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-09-18 11:06:17 +0000
commit7fca73be7c425e733ca5716a81c440c761bdf1d6 (patch)
treeac126405a49d169a265bcd98700bb9bf640bd9bf /perl-install/partition_table/raw.pm
parentc5a72673d869c8dd2d8f8f3d6d70649a64f8dbb5 (diff)
downloaddrakx-7fca73be7c425e733ca5716a81c440c761bdf1d6.tar
drakx-7fca73be7c425e733ca5716a81c440c761bdf1d6.tar.gz
drakx-7fca73be7c425e733ca5716a81c440c761bdf1d6.tar.bz2
drakx-7fca73be7c425e733ca5716a81c440c761bdf1d6.tar.xz
drakx-7fca73be7c425e733ca5716a81c440c761bdf1d6.zip
create partition_table::raw::read_primary out of partition_table::read_primary()
Diffstat (limited to 'perl-install/partition_table/raw.pm')
-rw-r--r--perl-install/partition_table/raw.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm
index e2fd7e949..c3138a54a 100644
--- a/perl-install/partition_table/raw.pm
+++ b/perl-install/partition_table/raw.pm
@@ -236,6 +236,17 @@ sub zero_MBR_and_dirty {
zero_MBR($hd);
}
+sub read_primary {
+ my ($hd) = @_;
+
+ my ($pt, $info) = eval { $hd->read_one(0) } or return;
+ my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info);
+ $hd->{primary} = $primary;
+ undef $hd->{extended};
+ partition_table::verifyPrimary($primary);
+ 1;
+}
+
sub pt_info_to_primary {
my ($hd, $pt, $info) = @_;