From nobody Tue Nov 11 19:02:18 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1565341913; cv=none; d=zoho.com; s=zohoarc; b=EuB4/y3MSYC/jMCcrsPMMGQccELHRisuKHcKBKRgF+hYB8My8QbDNcjTnuYn8ejTsbkNkvfoBIbXEVMr8P9Tjte86WH1tEjIDcmuzcHeKXeykzHza/ZLRYu0gLxVB2/KaCoHpk0GYL421yiDG9RCWZOZX6cdb6C0BnP+uTLvAn0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565341913; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=//+lX6UQKb82BdoWwzaDwOMyxnBp1Hpa0ht2ZoUZh20=; b=SG1k+z62NSTHw//W7P+0G/xvztIrHnfiBdCkkTdKm1DDYgtwNRM6BbiL97nR50A2sloHKDZqcn3Ppmfm8qnDoVOPc055URu4hf8UEIdCEqMdnznyrTnxqGI7eVBsFoAe7jmJWGGwu7uYdeNKs1OorNH/wgdYH//3nXinaBB5prM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 156534191371323.274721213274574; Fri, 9 Aug 2019 02:11:53 -0700 (PDT) Received: from localhost ([::1]:57488 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw0w8-00022w-HE for importer@patchew.org; Fri, 09 Aug 2019 05:11:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45479) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hw0vf-0001Yy-W4 for qemu-devel@nongnu.org; Fri, 09 Aug 2019 05:11:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hw0ve-0005om-Pp for qemu-devel@nongnu.org; Fri, 09 Aug 2019 05:11:19 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hw0vc-0005im-0r; Fri, 09 Aug 2019 05:11:16 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B3605EC522; Fri, 9 Aug 2019 09:11:14 +0000 (UTC) Received: from dhcp-200-226.str.redhat.com (dhcp-200-226.str.redhat.com [10.33.200.226]) by smtp.corp.redhat.com (Postfix) with ESMTP id C859E5D6A3; Fri, 9 Aug 2019 09:11:13 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Fri, 9 Aug 2019 11:11:07 +0200 Message-Id: <20190809091107.11161-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 09 Aug 2019 09:11:14 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH] qemu-img convert: Deprecate using -n and -o together X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" bdrv_create options specified with -o have no effect when skipping image creation with -n, so this doesn't make sense. Warn against the misuse and deprecate the combination so we can make it a hard error later. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Max Reitz --- qemu-img.c | 5 +++++ qemu-deprecated.texi | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/qemu-img.c b/qemu-img.c index 79983772de..d9321f6418 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -2231,6 +2231,11 @@ static int img_convert(int argc, char **argv) goto fail_getopt; } =20 + if (skip_create && options) { + warn_report("-o has no effect when skipping image creation"); + warn_report("This will become an error in future QEMU versions."); + } + s.src_num =3D argc - optind - 1; out_filename =3D s.src_num >=3D 1 ? argv[argc - 1] : NULL; =20 diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi index fff07bb2a3..7673d079c5 100644 --- a/qemu-deprecated.texi +++ b/qemu-deprecated.texi @@ -305,6 +305,13 @@ to just export the entire image and then mount only /d= ev/nbd0p1 than it is to reinvoke @command{qemu-nbd -c /dev/nbd0} limited to just a subset of the image. =20 +@subsection qemu-img convert -n -o (since 4.2.0) + +All options specified in @option{-o} are image creation options, so they +have no effect when used with @option{-n} to skip image creation. This +combination never made sense and shows that the user misunderstood the +effect of the options, so this will be made an error in future versions. + @section Build system =20 @subsection Python 2 support (since 4.1.0) --=20 2.20.1