From f5fb9a914d3637d1735a71daf563c2dc465f2d65 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 18 Mar 2004 10:37:44 +0000 Subject: not guessing a geometry when default_ok is no big deal --- perl-install/partition_table/dos.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install/partition_table/dos.pm') diff --git a/perl-install/partition_table/dos.pm b/perl-install/partition_table/dos.pm index 5ba3c940f..86f2c0256 100644 --- a/perl-install/partition_table/dos.pm +++ b/perl-install/partition_table/dos.pm @@ -151,15 +151,16 @@ sub set_best_geometry_for_the_partition_table { log::l("$hd->{device}: would need looking at BIOS info to find out geometry"); return; } + my $default_ok = is_geometry_valid_for_the_partition_table($hd, $hd->{geom}, 0); if ($guessed_geom->{invalid}) { log::l("$hd->{device}: no valid geometry guessed from partition table"); + $default_ok and return; $guessed_geom = try_every_geometry($hd) or return; } if ($guessed_geom->{heads} == $hd->{geom}{heads} && $guessed_geom->{sectors} == $hd->{geom}{sectors}) { # cool! } else { - my $default_ok = is_geometry_valid_for_the_partition_table($hd, $hd->{geom}, 0); my $guessed_ok = is_geometry_valid_for_the_partition_table($hd, $guessed_geom, 0); if ($default_ok && $guessed_ok) { #- oh my!? -- cgit v1.2.1