summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2011-01-31 11:50:09 +0100
committerKevin Wolf <kwolf@redhat.com>2011-01-31 11:57:44 +0100
commit02728badc1d72a19d38c52efa3a0c65164e3efc1 (patch)
tree92ce2868dc2f181bf65779832822178af5aa4320 /blockdev.c
parent2d378a50798a8fa389eb6476b6b0795121bfbc01 (diff)
downloadqemu-02728badc1d72a19d38c52efa3a0c65164e3efc1.tar.gz
qemu-02728badc1d72a19d38c52efa3a0c65164e3efc1.tar.bz2
qemu-02728badc1d72a19d38c52efa3a0c65164e3efc1.zip
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.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/blockdev.c b/blockdev.c
index 3f7b560b5d..4b2145c25b 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -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;