qemu-trivial.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: qemu-trivial@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [Qemu-trivial] [PATCH 0/5] qemu-img: make subcommand usage docstrings consistent
Date: Thu, 3 May 2018 21:03:54 -0400	[thread overview]
Message-ID: <df5d75a1-6855-c462-6f05-662a42f50f39@redhat.com> (raw)
In-Reply-To: <20180503225648.13153-1-jsnow@redhat.com>

On 05/03/2018 06:56 PM, John Snow wrote:
> I'm working on a project to attempt to autogenerate all of this, but
> until then let's just do a bit of the usual kinds of tidying.
> 
> ________________________________________________________________________________
> 
> For convenience, this branch is available at:
> https://github.com/jnsnow/qemu.git branch trivial-qemu-img
> https://github.com/jnsnow/qemu/tree/trivial-qemu-img
> 
> This version is tagged trivial-qemu-img-v1:
> https://github.com/jnsnow/qemu/releases/tag/trivial-qemu-img-v1
> 
> John Snow (5):
>   qemu-img-commands.hx: argument ordering fixups
>   qemu-img.texi: fix command ordering
>   qemu-img: remove references to GEN_DOCS
>   qemu-img: Make documentation between .texi and .hx consistent
>   qemu-img-cmds.hx: add passive-aggressive note
> 
>  qemu-img-cmds.hx       | 13 +++++----
>  qemu-img.c             |  2 --
>  qemu-img.texi          | 78 ++++++++++++++++++++++++++------------------------
>  qemu-options-wrapper.h |  1 -
>  4 files changed, 48 insertions(+), 46 deletions(-)
> 

Possessed by some kind of malevolent phantasm, I documented the following:

amend	 [--object objectdef] [--image-opts] [-q] [-f fmt]      filename
bench                                        [-q] [-f fmt] [-U] filename
check    [--object objectdef] [--image-opts] [-q] [-f fmt] [-U] filename
commit   [--object objectdef] [--image-opts] [-q] [-f fmt]      filename
compare  [--object objectdef] [--image-opts] [-q] [-f fmt] [-U] filename
convert  [--object objectdef] [--image-opts] [-q] [-f fmt] [-U] filename
create   [--object objectdef]                [-q] [-f fmt]      filename
dd                            [--image-opts]      [-f fmt] [-U]
info     [--object objectdef] [--image-opts]      [-f fmt] [-U] filename
map      [--object objectdef] [--image-opts]      [-f fmt] [-U] filename
measure  [--object objectdef] [--image-opts]      [-f fmt]      filename
snapshot [--object objectdef] [--image-opts] [-q]          [-U] filename
rebase   [--object objectdef] [--image-opts] [-q] [-f fmt] [-U] filename
resize   [--object objectdef] [--image-opts] [-q] [-f fmt]      filename

These are the largely universal set of options we support on most
commands, except sometimes some commands don't support them. Maybe
that's intentional, Maybe it isn't:

- Maybe we don't really want -U on commands that are opened RDWR.
- Maybe -f fmt isn't useful on snapshot or amend (which only work for
qcow2?)
- Maybe -q is inherently pretty useless for commands like info, map, or
measure whose job is to show you something.

Less clear to me:

- Is there no place for --image-opts for create?
- Or --object for dd?
- Or either of these two for bench?


The thought, though, is to define some core set of options that will
always apply to all commands. It might not always be perfect, but the
arguments listed here are a start for what probably makes sense for most
commands. Maybe it's a bad idea; but maybe individual parsers could opt
out of the common set of arguments on an as-needed basis instead.

Might help the documentation along to be able to point to some
definitely universal core group of options.

--js


  parent reply	other threads:[~2018-05-04  1:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-03 22:56 [Qemu-trivial] [PATCH 0/5] qemu-img: make subcommand usage docstrings consistent John Snow
2018-05-03 22:56 ` [Qemu-trivial] [PATCH 1/5] qemu-img-commands.hx: argument ordering fixups John Snow
2018-05-08 15:33   ` [Qemu-trivial] [Qemu-block] " Jeff Cody
2018-05-03 22:56 ` [Qemu-trivial] [PATCH 2/5] qemu-img.texi: fix command ordering John Snow
2018-05-08 15:33   ` [Qemu-trivial] [Qemu-block] " Jeff Cody
2018-05-03 22:56 ` [Qemu-trivial] [PATCH 3/5] qemu-img: remove references to GEN_DOCS John Snow
2018-05-08 15:45   ` [Qemu-trivial] [Qemu-block] " Jeff Cody
2018-05-03 22:56 ` [Qemu-trivial] [PATCH 4/5] qemu-img: Make documentation between .texi and .hx consistent John Snow
2018-05-08 15:45   ` [Qemu-trivial] [Qemu-block] " Jeff Cody
2018-05-03 22:56 ` [Qemu-trivial] [PATCH 5/5] qemu-img-cmds.hx: add passive-aggressive note John Snow
2018-05-08 15:49   ` [Qemu-trivial] [Qemu-block] " Jeff Cody
2018-05-04  1:03 ` John Snow [this message]
2018-05-09 18:07   ` [Qemu-trivial] [Qemu-block] [PATCH 0/5] qemu-img: make subcommand usage docstrings consistent Max Reitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=df5d75a1-6855-c462-6f05-662a42f50f39@redhat.com \
    --to=jsnow@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).