Capture output of arch-test
This commit is contained in:
parent
77a95f0002
commit
1e472dc33d
1 changed files with 4 additions and 2 deletions
|
@ -920,8 +920,10 @@ sub main() {
|
|||
sparc => 'sparc',
|
||||
sparc64 => 'sparc64',
|
||||
};
|
||||
my $ret = system 'arch-test', '-n', $nativearch;
|
||||
if ($ret >> 8 != 0) {
|
||||
open my $fh, '-|', 'arch-test', '-n', $nativearch // die "failed to fork(): $!";
|
||||
my $content = do { local $/; <$fh> };
|
||||
close $fh;
|
||||
if ($? != 0 or $content ne "$nativearch: ok") {
|
||||
if (!exists $deb2qemu->{$nativearch}) {
|
||||
die "no mapping from $nativearch to qemu-user binary";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue