X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=device-hotplug.c;h=6153259d7127ac106883abb646affcc869efa12b;hb=7ab7e9c7c791d89edda799ef1295836918efb585;hp=b10e8cc6d4b013d1d835e4b3ef6ca45f39c8cba0;hpb=452fcdbc49c59884c8c284268d64baa24fea11e1;p=mirror_qemu.git diff --git a/device-hotplug.c b/device-hotplug.c index b10e8cc6d4..6153259d71 100644 --- a/device-hotplug.c +++ b/device-hotplug.c @@ -28,13 +28,16 @@ #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" #include "monitor/monitor.h" #include "block/block_int.h" static DriveInfo *add_init_drive(const char *optstr) { + Error *err = NULL; DriveInfo *dinfo; QemuOpts *opts; MachineClass *mc; @@ -44,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; } @@ -68,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: