From nobody Sat May 18 22:54:17 2024 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=1554844125; cv=none; d=zoho.com; s=zohoarc; b=jky6s49BRK1R6bqBaC5VKJPsasNRR3MLqv6PMDg2pyWRER6SKtseT6oow3fxlR+Z5epC72ItKMA2OlXiA0zk5StBGrxJzLBOJfiMHD3A1vmZ/jAeVVFvKrafNa2IxP+EpvFe+KAmPiH2FBMlbilXvVlBRww6MxB1/bBmU4ctp8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554844125; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=EKyOqv9RnWSfyeCvEFiuypxyo9a00caJcett1O/Aq1Y=; b=f9ftSt2eqQ7QbZ55iaNG5XXWEKiS44Vtw0KWRaZsZvWrrkY84dx1CI/OEggARRET2y3ALLHurdsgrm8KH/mlDJGJ+ZnKGWwY+Ba5fy2x9P3vJKi4cW0p7rfVIj0yRsaI4XotHpwg41pTmOWI5bVTyhJyAt+yNXtS1x81JjvgBbg= 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 1554844125513445.6554203893048; Tue, 9 Apr 2019 14:08:45 -0700 (PDT) Received: from localhost ([127.0.0.1]:49130 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDxyy-0001V5-PJ for importer@patchew.org; Tue, 09 Apr 2019 17:08:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hDxy5-00016g-Hl for qemu-devel@nongnu.org; Tue, 09 Apr 2019 17:07:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hDxy1-0006Ud-J0 for qemu-devel@nongnu.org; Tue, 09 Apr 2019 17:07:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48338) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hDxxx-0006R2-ON; Tue, 09 Apr 2019 17:07:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EDC168AE4F; Tue, 9 Apr 2019 21:07:33 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-206.bos.redhat.com [10.18.17.206]) by smtp.corp.redhat.com (Postfix) with ESMTP id 802C75C8BC; Tue, 9 Apr 2019 21:06:56 +0000 (UTC) From: John Snow To: qemu-block@nongnu.org, qemu-devel@nongnu.org Date: Tue, 9 Apr 2019 17:06:55 -0400 Message-Id: <20190409210655.777-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 09 Apr 2019 21:07:34 +0000 (UTC) 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: fix .hx and .texi disparity 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, John Snow , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" It turns out that having options listed in three places continues to be a bad idea. I'm still toying with the idea of an improved infrastructure here, but in the meantime, another bandaid. There are three locations: (1) .hx file, formatted as texi (2) .hx file, formatted as human readable. (3) .texi file, as section headers, formatted as texi. You can compare the two summaries within the .hx file like so: Human-readable command summaries: `./qemu-img --help | grep 'Command syntax' -A14` Detokenized texi command summaries: `grep "@item" qemu-img-cmds.hx | sed -E 's|@var\{([^\}]*?)\}|\1|g'` You can compare the two separate texi summaries like so: Texi command summaries: `grep "@item" qemu-img-cmds.hx"` Texi command headers: grep -E "@item.*@var" qemu-img.texi | tail -14 Signed-off-by: John Snow Reviewed-by: Markus Armbruster --- qemu-img.texi | 4 ++-- qemu-img-cmds.hx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-img.texi b/qemu-img.texi index 3b6710a580..724f244ba1 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -197,7 +197,7 @@ Command description: =20 @table @option =20 -@item amend [--object @var{objectdef}] [--image-opts] [-p] [-p] [-f @var{f= mt}] [-t @var{cache}] -o @var{options} @var{filename} +@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{f= mt}] [-t @var{cache}] -o @var{options} @var{filename} =20 Amends the image format specific @var{options} for the image file @var{filename}. Not all file formats support this operation. @@ -424,7 +424,7 @@ To enumerate information about each disk image in the a= bove chain, starting from qemu-img info --backing-chain snap2.qcow2 @end example =20 -@item map [-f @var{fmt}] [--output=3D@var{ofmt}] @var{filename} +@item map [--object @var{objectdef}] [--image-opts] [-f @var{fmt}] [--outp= ut=3D@var{ofmt}] [-U] @var{filename} =20 Dump the metadata of image @var{filename} and its backing file chain. In particular, this commands dumps the allocation state of every sector diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 1526f327a5..4b47f7495d 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-cmds.hx @@ -46,7 +46,7 @@ ETEXI DEF("convert", img_convert, "convert [--object objectdef] [--image-opts] [--target-image-opts] [-U= ] [-C] [-c] [-p] [-q] [-n] [-f fmt] [-t cache] [-T src_cache] [-O output_fm= t] [-B backing_file] [-o options] [-l snapshot_param] [-S sparse_size] [-m = num_coroutines] [-W] filename [filename2 [...]] output_filename") STEXI -@item convert [--object @var{objectdef}] [--image-opts] [--target-image-op= ts] [-U] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{src_c= ache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}] [-l= @var{snapshot_param}] [-S @var{sparse_size}] [-m @var{num_coroutines}] [-W= ] @var{filename} [@var{filename2} [...]] @var{output_filename} +@item convert [--object @var{objectdef}] [--image-opts] [--target-image-op= ts] [-U] [-C] [-c] [-p] [-q] [-n] [-f @var{fmt}] [-t @var{cache}] [-T @var{= src_cache}] [-O @var{output_fmt}] [-B @var{backing_file}] [-o @var{options}= ] [-l @var{snapshot_param}] [-S @var{sparse_size}] [-m @var{num_coroutines}= ] [-W] @var{filename} [@var{filename2} [...]] @var{output_filename} ETEXI =20 DEF("create", img_create, --=20 2.17.2