X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=device-hotplug.c;h=6090d5f1e95f300799232efb7fe4f202c68ee860;hb=b0245d6478ea5906e3d7a542244d5c015fd47bc7;hp=23fd6656f1be2211cab1be2f17f927a465acda47;hpb=75f4cd297922e1ac352625badf548d4a1bb96089;p=mirror_qemu.git diff --git a/device-hotplug.c b/device-hotplug.c index 23fd6656f1..6090d5f1e9 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); + dinfo = drive_new(opts, mc->block_default_type, &err); if (!dinfo) { + error_report_err(err); qemu_opts_del(opts); return NULL; } @@ -69,10 +72,6 @@ void hmp_drive_add(Monitor *mon, const QDict *qdict) if (!dinfo) { goto err; } - if (dinfo->devaddr) { - monitor_printf(mon, "Parameter addr not supported\n"); - goto err; - } switch (dinfo->type) { case IF_NONE: