From c9c3e3687bb2f4e21c76e5c1ea73540db86d3d47 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 27 Sep 2004 03:41:29 +0000 Subject: don't call compute_nb_cylinders() before checking {sectors} and {heads} are valid --- perl-install/partition_table/dos.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm index d364b0030..ca64d3946 100644 --- a/perl-install/partition_table/dos.pm +++ b/perl-install/partition_table/dos.pm @@ -130,12 +130,12 @@ sub geometry_from_edd { my $geom = { sectors => 0 + cat_("$edd_dir/legacy_sectors_per_track"), heads => 1 + cat_("$edd_dir/legacy_max_head"), from_edd => 1 }; + is_geometry_valid_for_the_partition_table($hd, $geom) or return; partition_table::raw::compute_nb_cylinders($geom, $hd->{totalsectors}); log::l("geometry_from_edd $hd->{device} $hd->{volume_id}: " . geometry_to_string($geom)); - member($geom->{heads}, @valid_nb_heads) && member($geom->{sectors}, @valid_nb_sectors) - && $geom; + $geom; } -- cgit v1.2.1