summaryrefslogtreecommitdiff
path: root/hw/device-hotplug.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-01-28 11:21:41 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 10:59:09 +0100
commit2292ddaeab3467c68efd9e07e17ca0c9fc510fdc (patch)
tree7977bb2762dc972c8bbf4e2f20d0c034a6772839 /hw/device-hotplug.c
parent27d6bf40edc346a61ade6d4c5d4f27f6b40acc81 (diff)
blockdev: Make drive_add() take explicit type, index parameters
Before, type & index were hidden in printf-like fmt, ... parameters, which get expanded into an option string. Rather inconvenient for uses later in this series. New IF_DEFAULT to ask for the machine's default interface. Before, that was done by having no option "if" in the option string. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/device-hotplug.c')
-rw-r--r--hw/device-hotplug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/device-hotplug.c b/hw/device-hotplug.c
index 9704e2feb2..95a63726f3 100644
--- a/hw/device-hotplug.c
+++ b/hw/device-hotplug.c
@@ -33,7 +33,7 @@ DriveInfo *add_init_drive(const char *optstr)
DriveInfo *dinfo;
QemuOpts *opts;
- opts = drive_add(NULL, "%s", optstr);
+ opts = drive_def(optstr);
if (!opts)
return NULL;