All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dave@treblig.org>
To: Peter Maydell <peter.maydell@linaro.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:37:11 +0000	[thread overview]
Message-ID: <aTBnN6Q72QX3cW55@gallifrey> (raw)
In-Reply-To: <CAFEAcA-y5ucBTOgngim5cpuKbFYXajOz0zEeT2S0rC3wnMPSrw@mail.gmail.com>

* Peter Maydell (peter.maydell@linaro.org) wrote:
> 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).

Hah ok!  I guess that fudge could be removed and make it the
same way -M works.

Dave

> thanks
> -- PMM
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/


  reply	other threads:[~2025-12-03 16:37 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
2025-12-03 16:37           ` Dr. David Alan Gilbert [this message]
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=aTBnN6Q72QX3cW55@gallifrey \
    --to=dave@treblig.org \
    --cc=alex.bennee@linaro.org \
    --cc=jak@jak-linux.org \
    --cc=laurent@vivier.eu \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.