summaryrefslogtreecommitdiffstats
path: root/perl-install/partition_table.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-01-27 14:03:35 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-01-27 14:03:35 +0000
commitede63b3b0df1883f368711a6ca6746455d2a4076 (patch)
treed92b70d43c6a124e7f108a03f7de527ef0b83e0a /perl-install/partition_table.pm
parent28ef5814f5973e134faec194e952bbbe297a732b (diff)
downloaddrakx-backup-do-not-use-ede63b3b0df1883f368711a6ca6746455d2a4076.tar
drakx-backup-do-not-use-ede63b3b0df1883f368711a6ca6746455d2a4076.tar.gz
drakx-backup-do-not-use-ede63b3b0df1883f368711a6ca6746455d2a4076.tar.bz2
drakx-backup-do-not-use-ede63b3b0df1883f368711a6ca6746455d2a4076.tar.xz
drakx-backup-do-not-use-ede63b3b0df1883f368711a6ca6746455d2a4076.zip
no_comment
Diffstat (limited to 'perl-install/partition_table.pm')
-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 82c950349..624e616a0 100644
--- a/perl-install/partition_table.pm
+++ b/perl-install/partition_table.pm
@@ -3,6 +3,7 @@ package partition_table;
use diagnostics;
use strict;
use vars qw(@ISA %EXPORT_TAGS @EXPORT_OK @important_types @fields2save);
+use Data::Dumper;
@ISA = qw(Exporter);
%EXPORT_TAGS = (
@@ -16,7 +17,7 @@ use partition_table_raw;
use partition_table_dos;
use partition_table_bsd;
use partition_table_sun;
-use Data::Dumper;
+use log;
@important_types = ('Linux native', 'Linux swap', 'DOS FAT16', 'Win98 FAT32', 'Linux RAID');
@@ -352,18 +353,18 @@ sub read_one($$) {
sub read($;$) {
my ($hd, $clearall) = @_;
- my $pt = $clearall ?
- $hd->clear_raw :
- read_one($hd, 0) || return 0;
-
+ if ($clearall) {
+ partition_table_raw::zero_MBR($hd);
+ return 1;
+ }
+ my $pt = read_one($hd, 0) or return 0;
$hd->{primary} = $pt;
undef $hd->{extended};
- $clearall and return $hd->{isDirty} = $hd->{needKernelReread} = 1;
verifyPrimary($pt);
-
eval {
$pt->{extended} and read_extended($hd, $pt->{extended}) || return 0;
}; die "extended partition: $@" if $@;
+
assign_device_numbers($hd);
remove_empty_extended($hd);
1;