From cf324fe88c966783cb751ea61cce3c33f6912f65 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 6 Apr 2013 04:55:28 +0000 Subject: warn that i586 cannot rescue x86_64 (mga#8696) --- rescue/guessmounts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'rescue/guessmounts') diff --git a/rescue/guessmounts b/rescue/guessmounts index 9b592f07e..3ebc2fee5 100755 --- a/rescue/guessmounts +++ b/rescue/guessmounts @@ -58,6 +58,7 @@ if (@$raid_parts) { my @roots; +my $arch = arch() =~ /i.86/ ? $MDK::Common::System::compat_arch{arch()} : arch(); foreach (@$normal_parts) { my $dev = devices::make($_->{device}); @@ -72,6 +73,8 @@ foreach (@$normal_parts) { my $h = common::parse_release_file($target, $release_file, $_); add2hash($h, { dev => $dev, fs => $fs, fstab => \@fstab, pretty_name => "$h->{release} $h->{version} $h->{arch} on $dev" }); + # Offer to rescue only same arch: + $h->{pretty_name} .= " (cannot be rescued: $h->{arch} ne $arch;)" if $h->{arch} ne $arch; push @roots, $h; } system('umount', $target) == 0 or die "error unmounting $target\n"; -- cgit v1.2.1