X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=device-hotplug.c;h=f01d53774b062636aa81eaa13bd08af7ff46e87f;hb=6c4f0416be5805962a77af240a41fae5eaffda8b;hp=23fd6656f1be2211cab1be2f17f927a465acda47;hpb=c7b02d7d032d6022060e4b393827c963c93ce63f;p=thirdparty%2Fqemu.git diff --git a/device-hotplug.c b/device-hotplug.c index 23fd6656f1b..f01d53774b0 100644 --- a/device-hotplug.c +++ b/device-hotplug.c @@ -23,11 +23,11 @@ */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/boards.h" #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 +36,7 @@ static DriveInfo *add_init_drive(const char *optstr) { + Error *err = NULL; DriveInfo *dinfo; QemuOpts *opts; MachineClass *mc; @@ -45,8 +46,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; } @@ -69,10 +71,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: