cmd_dump: Make sure output filename ends in .qcow2

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
This commit is contained in:
Kent Overstreet 2022-06-18 18:34:02 -04:00
parent 03b8098d37
commit ff2ebf3f75

View File

@ -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);