qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Laurent Vivier <lvivier@redhat.com>
Cc: marcandre.lureau@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v5 2/2] Use help sub-sections to create sub-help options
Date: Tue, 6 Oct 2015 00:00:55 +0300	[thread overview]
Message-ID: <20151005232721-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1442253680-8657-3-git-send-email-lvivier@redhat.com>

On Mon, Sep 14, 2015 at 08:01:20PM +0200, Laurent Vivier wrote:
> As '-help' output is 400 lines long it is not easy
> to find information, but generally we know from
> which area we want the information.

I agree - a bit more order is IMHO needed in the general
-help - I'm not sure this is the place to start.
E.g. it is not your fault that it lists e.g. a ton of random
stuff as Standard options but this becomes more of
a problem if you hide things behind sub-sections.

For example, how do I change the amount of memory?
Currently I do --help and search for memory.


This also diverges from the way one queries other help
(-device foo,help, -cpu help  etc).

How about we move detailed help into each option instead?
This will mean only 113 lines which is a lot, but
kind of reasonable.

-machine [type=]name[,prop[=value][,...]] select emulated machine ('-machine help' for help)
-cpu cpu        select CPU ('-cpu help' for list)
-smp [cpus=]n[,prop[=value][,...]] configure SMP ('-smp help' for help)
-numa node[,prop[=value][,...]] configure NUMA ('-numa help' for help)


Of course it's also true that often the help says
nothing useful at all.


> As sections already exist in the help description,
> add some options to only display the wanted section.
> 
> '-help' now can take an optional parameter of the
> form -help[=LIST], which is a comma separated list
> of sections to display:
> 
>     all       display all help sections
>     help      display help options
>     standard  display standard options

What does standard options mean?

>     block     display block options
>     usb       display usb options
>     display   display display options
>     machine   display machine options
>     network   display network options
>     character display character options

Character device options?

>     url       display url options

what are these?

>     bt        display bt options

bluetooth options?

>     tpm       display tpm options
>     kernel    display kernel options
>     expert    display expert options
>     object    display object options

what are these?

> 
> '-help' without option displays only help options.
> 
> Example:
> 
>     $ x86_64-softmmu/qemu-system-x86_64 -help=kernel,usb
>     QEMU emulator version 2.4.50, Copyright (c) 2003-2008 Fabrice Bellard
>     usage: qemu-system-x86_64 [options] [disk_image]
> 
>     'disk_image' is a raw hard disk image for IDE hard disk 0
> 
>     Linux/Multiboot boot specific:
>     -kernel bzImage use 'bzImage' as kernel image
>     -append cmdline use 'cmdline' as kernel command line
>     -initrd file    use 'file' as initial ram disk
>     -dtb    file    use 'file' as device tree image
> 
>     USB options:
>     -usb            enable the USB driver (will be the default soon)
>     -usbdevice name add the host or guest USB device 'name'
> 
> Signed-off-by: Laurent Vivier <lvivier@redhat.com>

Maybe a good place to start is rewriting our man page.
We can then distill that to a minimum that makes sense
in -help.


-- 
MST

  parent reply	other threads:[~2015-10-05 21:01 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 18:01 [Qemu-devel] [PATCH v5 0/2] Improve -help Laurent Vivier
2015-09-14 18:01 ` [Qemu-devel] [PATCH v5 1/2] vl: Allow to define optional parameter with -arg[=params] Laurent Vivier
2015-09-24 16:14   ` Laurent Vivier
2015-09-14 18:01 ` [Qemu-devel] [PATCH v5 2/2] Use help sub-sections to create sub-help options Laurent Vivier
2015-09-24 16:14   ` Laurent Vivier
2015-10-05 21:00   ` Michael S. Tsirkin [this message]
2015-10-05 13:20 ` [Qemu-devel] [PATCH v5 0/2] Improve -help Laurent Vivier
2015-10-05 15:08   ` Marc-André Lureau
2015-10-05 15:17     ` Daniel P. Berrange
2015-10-05 21:08   ` Michael S. Tsirkin
2015-10-05 22:04     ` Laurent Vivier
2015-10-05 22:50       ` Michael S. Tsirkin
2015-10-05 15:32 ` Paolo Bonzini

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=20151005232721-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@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).