X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=device-hotplug.c;h=6153259d7127ac106883abb646affcc869efa12b;hb=7ab7e9c7c791d89edda799ef1295836918efb585;hp=cd427e2c764ca074efa243ce63a7ffae0faf7e73;hpb=42747d6abb5035473e5585fa17620c1e8983a70b;p=mirror_qemu.git diff --git a/device-hotplug.c b/device-hotplug.c index cd427e2c76..6153259d71 100644 --- a/device-hotplug.c +++ b/device-hotplug.c @@ -28,6 +28,7 @@ #include "sysemu/block-backend.h" #include "sysemu/blockdev.h" #include "qapi/qmp/qdict.h" +#include "qapi/error.h" #include "qemu/config-file.h" #include "qemu/option.h" #include "sysemu/sysemu.h" @@ -36,6 +37,7 @@ static DriveInfo *add_init_drive(const char *optstr) { + Error *err = NULL; DriveInfo *dinfo; QemuOpts *opts; MachineClass *mc; @@ -45,8 +47,9 @@ static DriveInfo *add_init_drive(const char *optstr) return NULL; mc = MACHINE_GET_CLASS(current_machine); - dinfo = drive_new(opts, mc->block_default_type); - if (!dinfo) { + dinfo = drive_new(opts, mc->block_default_type, &err); + if (err) { + error_report_err(err); qemu_opts_del(opts); return NULL; }