qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] qemu-img: check bs_n when use old style option


From: jemmy858585
Subject: [Qemu-devel] [PATCH] qemu-img: check bs_n when use old style option
Date: Thu, 20 Apr 2017 12:04:25 +0800

From: Lidong Chen <address@hidden>

When use old style option like -o backing_file, img_convert
continue run when bs_n > 1, this patch fix this bug.

Signed-off-by: Lidong Chen <address@hidden>
---
 qemu-img.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/qemu-img.c b/qemu-img.c
index b220cf7..c673aef 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -2225,6 +2225,13 @@ static int img_convert(int argc, char **argv)
         out_baseimg = out_baseimg_param;
     }
 
+    if (bs_n > 1 && out_baseimg) {
+        error_report("-B makes no sense when concatenating multiple input "
+                     "images");
+        ret = -1;
+        goto out;
+    }
+
     /* Check if compression is supported */
     if (compress) {
         bool encryption =
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]