On Wed, 3 Dec 2025 at 16:37, Dr. David Alan Gilbert <[email protected]> wrote:
>
> * Peter Maydell ([email protected]) wrote:
> > On Wed, 3 Dec 2025 at 16:20, Dr. David Alan Gilbert <[email protected]> 
> > wrote:
> > >
> > > * Peter Maydell ([email protected]) 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.

Yeah, I was pondering that. Also, we don't document --help in
the HTML docs, only -h.

-- PMM

Reply via email to