From 281d55f77a148cb8fafd4e73912c31e06d81acf4 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 27 Mar 2015 08:45:06 -0400 Subject: fix failing to read partition table (mga#13592, mga#15272) this is making it more readable regarding: "I cannot read the partition table of device XXX, it is too corrupted" (mga#13592, mga#15272, mga#15472) --- perl-install/partition_table/raw.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'perl-install/partition_table') diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index 281bcd98e..11bbbe59c 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -241,7 +241,8 @@ sub zero_MBR_and_dirty { sub read_primary { my ($hd) = @_; - my ($pt, $info) = eval { $hd->read_one(0) } or return; + my ($pt, $info) = eval { $hd->read_one(0) }; + @$pt or return; my $primary = partition_table::raw::pt_info_to_primary($hd, $pt, $info); $hd->{primary} = $primary; undef $hd->{extended}; -- cgit v1.2.1