diff options
author | Andrea Bolognani <abologna@redhat.com> | 2025-01-27 19:29:22 +0100 |
---|---|---|
committer | Alistair Francis <alistair.francis@wdc.com> | 2025-03-04 15:42:54 +1000 |
commit | c869f4129c8e35f3c234d757c0227c53134aca16 (patch) | |
tree | b351fafb14a7c39c1901a5d47e92557bd99f214f /scripts | |
parent | 1c17df6fc4bbddf55c8a64a3db7fb1115ecd30f5 (diff) | |
download | qemu-c869f4129c8e35f3c234d757c0227c53134aca16.zip qemu-c869f4129c8e35f3c234d757c0227c53134aca16.tar.gz qemu-c869f4129c8e35f3c234d757c0227c53134aca16.tar.bz2 |
binfmt: Shuffle things around
This should make no difference from the functional point of
view and it's just preparation for upcoming changes.
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-ID: <20250127182924.103510-2-abologna@redhat.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/qemu-binfmt-conf.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 6ef9f11..426f075 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b/scripts/qemu-binfmt-conf.sh @@ -318,20 +318,23 @@ qemu_set_binfmts() { mask=$(eval echo \$${cpu}_mask) family=$(eval echo \$${cpu}_family) + target="$cpu" + if [ "$cpu" = "i486" ] ; then + target="i386" + fi + + qemu="$QEMU_PATH/qemu-$target$QEMU_SUFFIX" + if [ "$magic" = "" ] || [ "$mask" = "" ] || [ "$family" = "" ] ; then echo "INTERNAL ERROR: unknown cpu $cpu" 1>&2 continue fi - qemu="$QEMU_PATH/qemu-$cpu" - if [ "$cpu" = "i486" ] ; then - qemu="$QEMU_PATH/qemu-i386" + if [ "$host_family" = "$family" ] ; then + continue fi - qemu="$qemu$QEMU_SUFFIX" - if [ "$host_family" != "$family" ] ; then - $BINFMT_SET - fi + $BINFMT_SET done } |