From 326642bc7f0ff95a0c08db527861a9a114a109da Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 11 Jul 2013 12:52:34 +0200 Subject: blockdev: Separate ID generation from DriveInfo creation blockdev-add shouldn't automatically generate IDs, but will keep most of the DriveInfo creation code. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Reviewed-by: Wenchao Xia Reviewed-by: Eric Blake --- util/qemu-option.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util') diff --git a/util/qemu-option.c b/util/qemu-option.c index e0844a966c..efcb5dcfcb 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -834,6 +834,12 @@ const char *qemu_opts_id(QemuOpts *opts) return opts->id; } +/* The id string will be g_free()d by qemu_opts_del */ +void qemu_opts_set_id(QemuOpts *opts, char *id) +{ + opts->id = id; +} + void qemu_opts_del(QemuOpts *opts) { QemuOpt *opt; -- cgit v1.2.1