qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Prevent overriding the input file with the output file when using qemu-img
@ 2018-01-23  4:40 River Chiang
  2018-01-23 14:48 ` Eric Blake
  0 siblings, 1 reply; 6+ messages in thread
From: River Chiang @ 2018-01-23  4:40 UTC (permalink / raw)
  To: qemu-devel

    Signed-off-by: River Chiang <riverchiang@gmail.com>

---------------------------------- qemu-img.c
----------------------------------
index 68b375f998..5ce594ea00 100644
@@ -2098,6 +2098,9 @@ static int img_convert(int argc, char **argv)
     if (s.src_num < 1) {
         error_report("Must specify image file name");
         goto fail_getopt;
+    } else if (!strcmp(argv[optind], out_filename)) {
+        error_report("Override the input file with the output file");
+        goto fail_getopt;
     }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-01-29 13:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-23  4:40 [Qemu-devel] Prevent overriding the input file with the output file when using qemu-img River Chiang
2018-01-23 14:48 ` Eric Blake
2018-01-23 15:26   ` Eric Blake
2018-01-25 10:52   ` Stefan Hajnoczi
2018-01-25 11:02     ` Daniel P. Berrangé
2018-01-29 13:49       ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).