diff options
author | Markus Armbruster <armbru@redhat.com> | 2011-01-31 11:50:09 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-01-31 11:57:44 +0100 |
commit | 5645b0f4f2185437d8df03810ce9c102cc4c90db (patch) | |
tree | 92ce2868dc2f181bf65779832822178af5aa4320 /blockdev.c | |
parent | 4e5d9b578f5d5ffbf7ef7e26abed23a0548a853a (diff) | |
download | qemu-5645b0f4f2185437d8df03810ce9c102cc4c90db.zip qemu-5645b0f4f2185437d8df03810ce9c102cc4c90db.tar.gz qemu-5645b0f4f2185437d8df03810ce9c102cc4c90db.tar.bz2 |
blockdev: Replace drive_add()'s fmt, ... by optstr parameter
Let the callers build the optstr. Only one wants to. All the others
become simpler, because they don't have to worry about escaping '%'.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
-rw-r--r-- | blockdev.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -93,17 +93,11 @@ QemuOpts *drive_def(const char *optstr) } QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file, - const char *fmt, ...) + const char *optstr) { - va_list ap; - char optstr[1024]; QemuOpts *opts; char buf[32]; - va_start(ap, fmt); - vsnprintf(optstr, sizeof(optstr), fmt, ap); - va_end(ap); - opts = drive_def(optstr); if (!opts) { return NULL; |