aboutsummaryrefslogtreecommitdiff
path: root/qemu-img-cmds.hx
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2024-08-22 13:23:10 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2024-08-23 12:08:11 +0300
commitd53bb908b552df11f4ac5541ec133ef4123fc0ca (patch)
treec9c602a71621bee1eac9f10493809d8f96c356a7 /qemu-img-cmds.hx
parent80e3541282af347538a37ee0673bcc04c622ad1c (diff)
system/vl.c: Print machine name, not "(null)", for unknown machine types
In commit 412d294ffdc we tried to improve the error message printed when the machine type is unknown, but we used the wrong variable, resulting in: $ ./build/x86/qemu-system-aarch64 -M bang qemu-system-aarch64: unsupported machine type: "(null)" Use -machine help to list supported machines Use the right variable, so we produce more helpful output: $ ./build/x86/qemu-system-aarch64 -M bang qemu-system-aarch64: unsupported machine type: "bang" Use -machine help to list supported machines Note that we must move the qdict_del() to below the error_setg(), because machine_type points into the value of that qdict entry, and deleting it will make the pointer invalid. Cc: qemu-stable@nongnu.org Fixes: 412d294ffdc ("vl.c: select_machine(): add selected machine type to error message") Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'qemu-img-cmds.hx')
0 files changed, 0 insertions, 0 deletions