qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: "Dr. David Alan Gilbert" <dave@treblig.org>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
	qemu-trivial@nongnu.org, mjt@tls.msk.ru, laurent@vivier.eu,
	thuth@redhat.com, pbonzini@redhat.com, jak@jak-linux.org,
	qemu-devel@nongnu.org
Subject: Re: [PATCH] qemu-options.hx: Document -M as -machine alias
Date: Wed, 3 Dec 2025 16:28:35 +0000	[thread overview]
Message-ID: <CAFEAcA-y5ucBTOgngim5cpuKbFYXajOz0zEeT2S0rC3wnMPSrw@mail.gmail.com> (raw)
In-Reply-To: <aTBjTzbaX0befChO@gallifrey>

On Wed, 3 Dec 2025 at 16:20, Dr. David Alan Gilbert <dave@treblig.org> wrote:
>
> * Peter Maydell (peter.maydell@linaro.org) wrote:
> > Surprisingly, this and -h/--help are our only two options where
> > we provide a short synonym. I note that this handling of -M
> > is not consistent with how we document -h/--help, where we
> > print both on a single line:
> > -h or -help     display this help and exit
> >
> > But it would be trickier to fit that in for -machine and
> > perhaps confusing given the suboptions.
>
> Right, that's one of the two reasons I kept it separate.
> The other reason, is that I couldn't figure out how '-help' and '-h'
> both got defined - why is the second DEF(...) not needed?

A piece of delicious fudge lurking in system/vl.c: we have
this hardcoded entry in the qemu_options[] array before
the ones that are generated via the macro-magic from
qemu-options.hx:

    { "h", 0, QEMU_OPTION_h, QEMU_ARCH_ALL },

So we recognize -h on the command line and turn it into
QEMU_OPTION_h, the same as -help, but it doesn't result in
anything in the documentation (we leave that up to the
strings and RST in the DEF("help"...) section).

thanks
-- PMM


  reply	other threads:[~2025-12-03 16:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-03 13:15 [PATCH] qemu-options.hx: Document -M as -machine alias dave
2025-12-03 13:28 ` Alex Bennée
2025-12-03 13:59   ` Dr. David Alan Gilbert
2025-12-03 16:06     ` Peter Maydell
2025-12-03 16:20       ` Dr. David Alan Gilbert
2025-12-03 16:28         ` Peter Maydell [this message]
2025-12-03 16:37           ` Dr. David Alan Gilbert
2025-12-03 16:43             ` Peter Maydell
2025-12-11  3:31       ` Xiaoyao Li
2025-12-03 13:59 ` Paolo Bonzini
2025-12-04  7:31 ` Thomas Huth

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=CAFEAcA-y5ucBTOgngim5cpuKbFYXajOz0zEeT2S0rC3wnMPSrw@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=alex.bennee@linaro.org \
    --cc=dave@treblig.org \
    --cc=jak@jak-linux.org \
    --cc=laurent@vivier.eu \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    --cc=thuth@redhat.com \
    /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).