X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=bootdevice.c;h=1d225202f9726e536d3466a28a6eaa5a8304a41b;hb=6b7ac49d570c66754fad1b80cc200c7596d1facd;hp=2e83ff05ebc8af00af9058b1e6a11a7001c7eaef;hpb=553934db664ecee676650fac0330dceff3531736;p=mirror_qemu.git diff --git a/bootdevice.c b/bootdevice.c index 2e83ff05eb..1d225202f9 100644 --- a/bootdevice.c +++ b/bootdevice.c @@ -27,7 +27,9 @@ #include "sysemu/sysemu.h" #include "qapi/visitor.h" #include "qemu/error-report.h" -#include "hw/hw.h" +#include "sysemu/reset.h" +#include "hw/qdev-core.h" +#include "hw/boards.h" typedef struct FWBootEntry FWBootEntry; @@ -207,11 +209,13 @@ DeviceState *get_boot_device(uint32_t position) * memory pointed by "size" is assigned total length of the array in bytes * */ -char *get_boot_devices_list(size_t *size, bool ignore_suffixes) +char *get_boot_devices_list(size_t *size) { FWBootEntry *i; size_t total = 0; char *list = NULL; + MachineClass *mc = MACHINE_GET_CLASS(qdev_get_machine()); + bool ignore_suffixes = mc->ignore_boot_device_suffixes; QTAILQ_FOREACH(i, &fw_boot_order, link) { char *devpath = NULL, *suffix = NULL; @@ -301,9 +305,7 @@ static void device_set_bootindex(Object *obj, Visitor *v, const char *name, add_boot_device_path(*prop->bootindex, prop->dev, prop->suffix); out: - if (local_err) { - error_propagate(errp, local_err); - } + error_propagate(errp, local_err); } static void property_release_bootindex(Object *obj, const char *name,