From ff2ebf3f75814bc45353013782ebeb1556adfc05 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Sat, 18 Jun 2022 18:34:02 -0400 Subject: [PATCH] cmd_dump: Make sure output filename ends in .qcow2 Signed-off-by: Kent Overstreet --- cmd_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd_dump.c b/cmd_dump.c index 39d28f2a..4e3d721f 100644 --- a/cmd_dump.c +++ b/cmd_dump.c @@ -166,8 +166,8 @@ int cmd_dump(int argc, char *argv[]) continue; char *path = nr_devices > 1 - ? mprintf("%s.%u", out, i) - : strdup(out); + ? mprintf("%s.%u.qcow2", out, i) + : mprintf("%s.qcow2", out); fd = xopen(path, flags, 0600); free(path);