X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=bootdevice.c;h=33e3029e40f4017ea6c548fd0d119cc89e497b5e;hb=18adde86ddc6dbef865a3d360bf8e15dce85756d;hp=3cdc0d7b2249f73804055a767906462b6980532b;hpb=f75d4f82950c9e74c7202081f1cb97ae94b7c7d8;p=mirror_qemu.git diff --git a/bootdevice.c b/bootdevice.c index 3cdc0d7b22..33e3029e40 100644 --- a/bootdevice.c +++ b/bootdevice.c @@ -22,10 +22,13 @@ * THE SOFTWARE. */ +#include "qemu/osdep.h" +#include "qapi/error.h" #include "sysemu/sysemu.h" #include "qapi/visitor.h" #include "qemu/error-report.h" #include "hw/hw.h" +#include "hw/qdev-core.h" typedef struct FWBootEntry FWBootEntry; @@ -270,21 +273,21 @@ typedef struct { DeviceState *dev; } BootIndexProperty; -static void device_get_bootindex(Object *obj, Visitor *v, void *opaque, - const char *name, Error **errp) +static void device_get_bootindex(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) { BootIndexProperty *prop = opaque; - visit_type_int32(v, prop->bootindex, name, errp); + visit_type_int32(v, name, prop->bootindex, errp); } -static void device_set_bootindex(Object *obj, Visitor *v, void *opaque, - const char *name, Error **errp) +static void device_set_bootindex(Object *obj, Visitor *v, const char *name, + void *opaque, Error **errp) { BootIndexProperty *prop = opaque; int32_t boot_index; Error *local_err = NULL; - visit_type_int32(v, &boot_index, name, &local_err); + visit_type_int32(v, name, &boot_index, &local_err); if (local_err) { goto out; } @@ -299,9 +302,7 @@ static void device_set_bootindex(Object *obj, Visitor *v, void *opaque, 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,