From d2a1029ee5e436c36a931b216ad19087f69e203a Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Fri, 27 Sep 2019 10:18:15 +0200 Subject: [PATCH] collect all diagnostics about binfmt_misc before throwing error --- mmdebstrap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mmdebstrap b/mmdebstrap index d4c86b1..c95bffa 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -2004,14 +2004,14 @@ sub main() { { open my $fh, '<', '/proc/filesystems' or error "failed to open /proc/filesystems: $!"; unless (grep /^nodev\tbinfmt_misc$/, (<$fh>)) { - error "binfmt_misc not found in /proc/filesystems -- is the module loaded?"; + warning "binfmt_misc not found in /proc/filesystems -- is the module loaded?"; } close $fh; } { open my $fh, '<', '/proc/mounts' or error "failed to open /proc/mounts: $!"; unless (grep /^binfmt_misc \/proc\/sys\/fs\/binfmt_misc binfmt_misc/, (<$fh>)) { - error "binfmt_misc not found in /proc/mounts -- not mounted?"; + warning "binfmt_misc not found in /proc/mounts -- not mounted?"; } close $fh; } @@ -2020,10 +2020,10 @@ sub main() { chomp (my $binfmts = do { local $/; <$fh> }); close $fh; if ($binfmts eq '') { - error "qemu-$options->{qemu} is not a supported binfmt name"; + warning "qemu-$options->{qemu} is not a supported binfmt name"; } } - error "qemu emulation of $nativearch failed for an unknown reason"; + error "qemu user emulation of $nativearch using binfmt_misc failed"; } elsif ($withemu == 0 and $noemu == 1) { error "arch-test succeeded without emu but not with emu"; } elsif ($withemu == 1 and $noemu == 0) {