From 5645b0f4f2185437d8df03810ce9c102cc4c90db Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 31 Jan 2011 11:50:09 +0100 Subject: 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 Signed-off-by: Kevin Wolf --- blockdev.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'blockdev.c') 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; -- cgit v1.2.3