From nobody Mon May 6 12:13:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1492661134924741.4741728327685; Wed, 19 Apr 2017 21:05:34 -0700 (PDT) Received: from localhost ([::1]:51542 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d13LY-0006Zc-Vv for importer@patchew.org; Thu, 20 Apr 2017 00:05:33 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d13Kj-0006CQ-2p for qemu-devel@nongnu.org; Thu, 20 Apr 2017 00:04:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d13Kf-0001Bj-PI for qemu-devel@nongnu.org; Thu, 20 Apr 2017 00:04:41 -0400 Received: from mail-io0-x242.google.com ([2607:f8b0:4001:c06::242]:35711) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d13Kf-0001AX-Kg; Thu, 20 Apr 2017 00:04:37 -0400 Received: by mail-io0-x242.google.com with SMTP id d203so11524454iof.2; Wed, 19 Apr 2017 21:04:37 -0700 (PDT) Received: from localhost.localdomain ([119.28.70.25]) by smtp.gmail.com with ESMTPSA id f124sm7073902pgc.43.2017.04.19.21.04.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Apr 2017 21:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=55qcL5RDpuB7DWL1CBuDlFSdFpSXitaQd+xhAOPXshQ=; b=Xy3xQHvQZhFVmN7SfkiDJlWNIOlV2u7jI8NKNjrpUblcK2Ek9OAxRTTGEqB8a01rTy 5iN8+R0nLNEq3X3fjVCBbcNXBSrygPUDD76inSi43qniKpXWY4p9adaqcNFFHvlO9Yxy tIM7kI8xXpnGZ139antDGPM+72UVvmyMAwLJs5vF1Y/5XeYuOO3m1BCGU//WhSO6vSyZ Z65XhxCVCX7rZfEy04k3rmwsjBMsfKZGQn0iGhbxZKSh2YNqNtawFiv7ID9qKP0aeLIS yQPCDcHoS7bs3eMRtDDHzqD4riaf7f412tgYxpL49K8nHKrl6ZpujnuuSEjJD2urkTfO DFWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=55qcL5RDpuB7DWL1CBuDlFSdFpSXitaQd+xhAOPXshQ=; b=C8s6EMm5KXzz6I/r4Hz2UV6/rTyisWBWHZkuyGJuFGLUfGSTEZ14qBbjr8LrXnt21X XvhVIhHAocU5WouYPpctrhX0FSB1QSbm0dFmFE4aag9sVVsOPiLLAZ0jQUE3kfXXIFTq 5cPrkubvptZU51AwUgbiWc10OQZhJvNGMCExxkJPOiiIRZp21bZoFSkihuAGTXA3Oet0 2LUEVmDn8unMvLzY1yj1KblIT2R2FCLGUfTLdbVFokHQfhbElpt+bOJnSPlcE4mQ3swz AYnmr+R0WI6G/PUBL8dOsvUPH6MtErCt2ICZTkiNDFHlHhPlnwBbJ0zF0u7dSmMZH/Ro 3mXg== X-Gm-Message-State: AN3rC/4g7Y/wmB48jGaz5rObvWBpVSEDItfT3WtHDwZ3Z6tltT/H+0OY dT/7Ty98OThwig== X-Received: by 10.84.213.143 with SMTP id g15mr6579294pli.53.1492661076793; Wed, 19 Apr 2017 21:04:36 -0700 (PDT) From: jemmy858585@gmail.com X-Google-Original-From: lidongchen@tencent.com To: qemu-devel@nongnu.org Date: Thu, 20 Apr 2017 12:04:25 +0800 Message-Id: <1492661065-18510-1-git-send-email-lidongchen@tencent.com> X-Mailer: git-send-email 1.8.3.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::242 Subject: [Qemu-devel] [PATCH] qemu-img: check bs_n when use old style option X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, Lidong Chen , qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: Lidong Chen 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 --- 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 =3D out_baseimg_param; } =20 + if (bs_n > 1 && out_baseimg) { + error_report("-B makes no sense when concatenating multiple input " + "images"); + ret =3D -1; + goto out; + } + /* Check if compression is supported */ if (compress) { bool encryption =3D --=20 1.8.3.1