* [Qemu-devel] [PATCH v2 for-2.10 0/4] improved --version/--help tweaks @ 2017-07-28 16:47 Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help Eric Blake ` (3 more replies) 0 siblings, 4 replies; 13+ messages in thread From: Eric Blake @ 2017-07-28 16:47 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini, kwolf, mreitz, qemu-block, peter.maydell Merge two previous postings. I'm not sure what tree this should go through (Paolo's miscellaneous patches?) Eric Blake (4): qemu-img: Sort sub-command names in --help qemu-io: Give more --version information qga: Give more --version information maint: Include bug-reporting info in --help output. include/qemu-common.h | 5 +++++ vl.c | 4 +++- bsd-user/main.c | 2 ++ linux-user/main.c | 4 +++- qemu-img.c | 2 +- qemu-io.c | 9 ++++++--- qemu-nbd.c | 2 +- qga/main.c | 8 +++++--- qemu-img-cmds.hx | 9 ++++++--- 9 files changed, 32 insertions(+), 13 deletions(-) -- 2.13.3 ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help 2017-07-28 16:47 [Qemu-devel] [PATCH v2 for-2.10 0/4] improved --version/--help tweaks Eric Blake @ 2017-07-28 16:47 ` Eric Blake 2017-08-02 12:42 ` Daniel P. Berrange 2017-08-03 15:14 ` Kevin Wolf 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information Eric Blake ` (2 subsequent siblings) 3 siblings, 2 replies; 13+ messages in thread From: Eric Blake @ 2017-07-28 16:47 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini, kwolf, mreitz, qemu-block, peter.maydell 'amend' was the only sub-command not listed alphabetically; hoist it earlier, and separate the @end table block to make it easier to copy-and-paste the addition of future sub-commands. Signed-off-by: Eric Blake <eblake@redhat.com> --- qemu-img-cmds.hx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx index 3763f13625..8bd6f748c3 100644 --- a/qemu-img-cmds.hx +++ b/qemu-img-cmds.hx @@ -9,6 +9,12 @@ STEXI @table @option ETEXI +DEF("amend", img_amend, + "amend [--object objectdef] [--image-opts] [-p] [-q] [-f fmt] [-t cache] -o options filename") +STEXI +@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{fmt}] [-t @var{cache}] -o @var{options} @var{filename} +ETEXI + DEF("bench", img_bench, "bench [-c count] [-d depth] [-f fmt] [--flush-interval=flush_interval] [-n] [--no-drain] [-o offset] [--pattern=pattern] [-q] [-s buffer_size] [-S step_size] [-t cache] [-w] [-U] filename") STEXI @@ -87,9 +93,6 @@ STEXI @item resize [--object @var{objectdef}] [--image-opts] [-q] @var{filename} [+ | -]@var{size} ETEXI -DEF("amend", img_amend, - "amend [--object objectdef] [--image-opts] [-p] [-q] [-f fmt] [-t cache] -o options filename") STEXI -@item amend [--object @var{objectdef}] [--image-opts] [-p] [-q] [-f @var{fmt}] [-t @var{cache}] -o @var{options} @var{filename} @end table ETEXI -- 2.13.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help Eric Blake @ 2017-08-02 12:42 ` Daniel P. Berrange 2017-08-03 15:14 ` Kevin Wolf 1 sibling, 0 replies; 13+ messages in thread From: Daniel P. Berrange @ 2017-08-02 12:42 UTC (permalink / raw) To: Eric Blake; +Cc: qemu-devel, kwolf, pbonzini, peter.maydell, qemu-block, mreitz On Fri, Jul 28, 2017 at 11:47:05AM -0500, Eric Blake wrote: > 'amend' was the only sub-command not listed alphabetically; hoist > it earlier, and separate the @end table block to make it easier > to copy-and-paste the addition of future sub-commands. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > qemu-img-cmds.hx | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help Eric Blake 2017-08-02 12:42 ` Daniel P. Berrange @ 2017-08-03 15:14 ` Kevin Wolf 2017-08-03 15:30 ` Eric Blake 1 sibling, 1 reply; 13+ messages in thread From: Kevin Wolf @ 2017-08-03 15:14 UTC (permalink / raw) To: Eric Blake; +Cc: qemu-devel, pbonzini, mreitz, qemu-block, peter.maydell Am 28.07.2017 um 18:47 hat Eric Blake geschrieben: > 'amend' was the only sub-command not listed alphabetically; Not completel true: create is the second one that is in the wrong place, it should come after commit/compare/convert. Do you want to fix that one, too? > hoist it earlier, and separate the @end table block to make it easier > to copy-and-paste the addition of future sub-commands. > > Signed-off-by: Eric Blake <eblake@redhat.com> Kevin ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help 2017-08-03 15:14 ` Kevin Wolf @ 2017-08-03 15:30 ` Eric Blake 0 siblings, 0 replies; 13+ messages in thread From: Eric Blake @ 2017-08-03 15:30 UTC (permalink / raw) To: Kevin Wolf; +Cc: qemu-devel, pbonzini, mreitz, qemu-block, peter.maydell [-- Attachment #1: Type: text/plain, Size: 1284 bytes --] On 08/03/2017 10:14 AM, Kevin Wolf wrote: > Am 28.07.2017 um 18:47 hat Eric Blake geschrieben: >> 'amend' was the only sub-command not listed alphabetically; > > Not completel true: create is the second one that is in the wrong place, > it should come after commit/compare/convert. Do you want to fix that > one, too? Indeed. I wonder if part of the issue is due to an 80-columen window displaying qemu-img --help as a wall-o-text and therefore I missed command names; maybe some well-place newlines and tabs would aid legibility, as in: bench [-c count] [-d depth] [-f fmt] [--flush-interval=flush_interval] [-n] [--no-drain] [-o offset] [--pattern=pattern] [-q] [-s buffer_size] [-S step_size] [-t cache] [-w] [-U] filename check [-q] [--object objectdef] [--image-opts] [-f fmt] [--output=ofmt] [-r [leaks | all]] [-T src_cache] [-U] filename ... But for this patch, I'll just fix the sorting of 'create'. > >> hoist it earlier, and separate the @end table block to make it easier >> to copy-and-paste the addition of future sub-commands. >> >> Signed-off-by: Eric Blake <eblake@redhat.com> > > Kevin > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 619 bytes --] ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information 2017-07-28 16:47 [Qemu-devel] [PATCH v2 for-2.10 0/4] improved --version/--help tweaks Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help Eric Blake @ 2017-07-28 16:47 ` Eric Blake 2017-08-02 12:44 ` Daniel P. Berrange 2017-08-03 15:16 ` Kevin Wolf 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 3/4] qga: " Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output Eric Blake 3 siblings, 2 replies; 13+ messages in thread From: Eric Blake @ 2017-07-28 16:47 UTC (permalink / raw) To: qemu-devel; +Cc: pbonzini, kwolf, mreitz, qemu-block, peter.maydell Include the package version information (useful for detecting builds from git or downstream backports), and the copyright notice. Signed-off-by: Eric Blake <eblake@redhat.com> --- qemu-io.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/qemu-io.c b/qemu-io.c index 4cfa41c8f9..ec175630a6 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -26,6 +26,7 @@ #include "block/block_int.h" #include "trace/control.h" #include "crypto/init.h" +#include "qemu-version.h" #define CMD_NOFILE_OK 0x01 @@ -522,7 +523,8 @@ int main(int argc, char **argv) trace_file = trace_opt_parse(optarg); break; case 'V': - printf("%s version %s\n", progname, QEMU_VERSION); + printf("%s version " QEMU_VERSION QEMU_PKGVERSION "\n" + QEMU_COPYRIGHT "\n", progname); exit(0); case 'h': usage(progname); -- 2.13.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information Eric Blake @ 2017-08-02 12:44 ` Daniel P. Berrange 2017-08-03 15:16 ` Kevin Wolf 1 sibling, 0 replies; 13+ messages in thread From: Daniel P. Berrange @ 2017-08-02 12:44 UTC (permalink / raw) To: Eric Blake; +Cc: qemu-devel, kwolf, pbonzini, peter.maydell, qemu-block, mreitz On Fri, Jul 28, 2017 at 11:47:06AM -0500, Eric Blake wrote: > Include the package version information (useful for detecting > builds from git or downstream backports), and the copyright notice. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > qemu-io.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information Eric Blake 2017-08-02 12:44 ` Daniel P. Berrange @ 2017-08-03 15:16 ` Kevin Wolf 1 sibling, 0 replies; 13+ messages in thread From: Kevin Wolf @ 2017-08-03 15:16 UTC (permalink / raw) To: Eric Blake; +Cc: qemu-devel, pbonzini, mreitz, qemu-block, peter.maydell Am 28.07.2017 um 18:47 hat Eric Blake geschrieben: > Include the package version information (useful for detecting > builds from git or downstream backports), and the copyright notice. > > Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: Kevin Wolf <kwolf@redhat.com> ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 3/4] qga: Give more --version information 2017-07-28 16:47 [Qemu-devel] [PATCH v2 for-2.10 0/4] improved --version/--help tweaks Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information Eric Blake @ 2017-07-28 16:47 ` Eric Blake 2017-08-02 12:45 ` Daniel P. Berrange 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output Eric Blake 3 siblings, 1 reply; 13+ messages in thread From: Eric Blake @ 2017-07-28 16:47 UTC (permalink / raw) To: qemu-devel Cc: pbonzini, kwolf, mreitz, qemu-block, peter.maydell, Michael Roth Include the package version information (useful for detecting builds from git or downstream backports), and the copyright notice. Signed-off-by: Eric Blake <eblake@redhat.com> --- qga/main.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/qga/main.c b/qga/main.c index 1b381d0bf3..b64c7ac2a2 100644 --- a/qga/main.c +++ b/qga/main.c @@ -29,6 +29,7 @@ #include "qemu/help_option.h" #include "qemu/sockets.h" #include "qemu/systemd.h" +#include "qemu-version.h" #ifdef _WIN32 #include "qga/service-win32.h" #include "qga/vss-win32.h" @@ -213,7 +214,8 @@ static void usage(const char *cmd) { printf( "Usage: %s [-m <method> -p <path>] [<options>]\n" -"QEMU Guest Agent %s\n" +"QEMU Guest Agent " QEMU_VERSION QEMU_PKGVERSION "\n" +QEMU_COPYRIGHT "\n" "\n" " -m, --method transport method: one of unix-listen, virtio-serial,\n" " isa-serial, or vsock-listen (virtio-serial is the default)\n" @@ -248,7 +250,7 @@ static void usage(const char *cmd) " -h, --help display this help and exit\n" "\n" "Report bugs to <mdroth@linux.vnet.ibm.com>\n" - , cmd, QEMU_VERSION, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, + , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, dfl_pathnames.pidfile, #ifdef CONFIG_FSFREEZE QGA_FSFREEZE_HOOK_DEFAULT, -- 2.13.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/4] qga: Give more --version information 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 3/4] qga: " Eric Blake @ 2017-08-02 12:45 ` Daniel P. Berrange 0 siblings, 0 replies; 13+ messages in thread From: Daniel P. Berrange @ 2017-08-02 12:45 UTC (permalink / raw) To: Eric Blake Cc: qemu-devel, kwolf, peter.maydell, qemu-block, Michael Roth, mreitz, pbonzini On Fri, Jul 28, 2017 at 11:47:07AM -0500, Eric Blake wrote: > Include the package version information (useful for detecting > builds from git or downstream backports), and the copyright notice. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > qga/main.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| ^ permalink raw reply [flat|nested] 13+ messages in thread
* [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output. 2017-07-28 16:47 [Qemu-devel] [PATCH v2 for-2.10 0/4] improved --version/--help tweaks Eric Blake ` (2 preceding siblings ...) 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 3/4] qga: " Eric Blake @ 2017-07-28 16:47 ` Eric Blake 2017-08-02 12:46 ` Daniel P. Berrange 2017-08-03 16:21 ` Philippe Mathieu-Daudé 3 siblings, 2 replies; 13+ messages in thread From: Eric Blake @ 2017-07-28 16:47 UTC (permalink / raw) To: qemu-devel Cc: pbonzini, kwolf, mreitz, qemu-block, peter.maydell, Riku Voipio, Laurent Vivier, Michael Roth These days, many programs are including a bug-reporting address, or better yet, a link to the project web site, at the tail of their --help output. However, we were not very consistent at doing so: only qemu-nbd and qemu-qa mentioned anything, with the latter pointing to an individual person instead of the project. Add a new #define that sets up a uniform string, mentioning both bug reporting instructions and overall project details, and which a downstream vendor could tweak if they want bugs to go to a downstream database. Then use it in all of our binaries which have --help output. The canned text intentionally references http:// instead of https:// because our https website currently causes certificate errors in some browsers. That can be tweaked later once we have resolved the web site issued. Signed-off-by: Eric Blake <eblake@redhat.com> --- v2: tweak text to capitalize QEMU and use consistent trailing . include/qemu-common.h | 5 +++++ vl.c | 4 +++- bsd-user/main.c | 2 ++ linux-user/main.c | 4 +++- qemu-img.c | 2 +- qemu-io.c | 5 +++-- qemu-nbd.c | 2 +- qga/main.c | 2 +- 8 files changed, 19 insertions(+), 7 deletions(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index b5adbfa5e9..d29045631f 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -22,6 +22,11 @@ #define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \ "Fabrice Bellard and the QEMU Project developers" +/* Bug reporting information for --help arguments, About dialogs, etc */ +#define QEMU_BUGREPORTS \ + "See <http://qemu.org/contribute/report-a-bug> for bug reports.\n" \ + "More information on the QEMU project at <http://qemu.org>." + /* main function, renamed */ #if defined(CONFIG_COCOA) int qemu_main(int argc, char **argv, char **envp); diff --git a/vl.c b/vl.c index fb6b2efafa..b824f81f64 100644 --- a/vl.c +++ b/vl.c @@ -1942,7 +1942,9 @@ static void help(int exitcode) "ctrl-alt-n switch to virtual console 'n'\n" "ctrl-alt toggle mouse and keyboard grab\n" "\n" - "When using -nographic, press 'ctrl-a h' to get some help.\n"); + "When using -nographic, press 'ctrl-a h' to get some help.\n" + "\n" + QEMU_BUGREPORTS "\n"); exit(exitcode); } diff --git a/bsd-user/main.c b/bsd-user/main.c index 501e16f675..4db10cb376 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -686,6 +686,8 @@ static void usage(void) " -E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG\n" "Note that if you provide several changes to single variable\n" "last change will stay in effect.\n" + "\n" + QEMU_BUGREPORTS "\n" , TARGET_NAME, interp_prefix, diff --git a/linux-user/main.c b/linux-user/main.c index 2b38d39d87..7d6e481277 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4136,7 +4136,9 @@ static void usage(int exitcode) " -E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUG\n" " QEMU_SET_ENV=var1=val2,var2=val2 QEMU_UNSET_ENV=LD_PRELOAD,LD_DEBUG\n" "Note that if you provide several changes to a single variable\n" - "the last change will stay in effect.\n"); + "the last change will stay in effect.\n" + "\n" + QEMU_BUGREPORTS "\n"); exit(exitcode); } diff --git a/qemu-img.c b/qemu-img.c index f4d5f0d77d..758719e083 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -201,7 +201,7 @@ static void QEMU_NORETURN help(void) printf("%s\nSupported formats:", help_msg); bdrv_iterate_format(format_print, NULL); - printf("\n"); + printf("\n\n" QEMU_BUGREPORTS "\n"); exit(EXIT_SUCCESS); } diff --git a/qemu-io.c b/qemu-io.c index ec175630a6..b93553a603 100644 --- a/qemu-io.c +++ b/qemu-io.c @@ -262,8 +262,9 @@ static void usage(const char *name) " -h, --help display this help and exit\n" " -V, --version output version information and exit\n" "\n" -"See '%s -c help' for information on available commands." -"\n", +"See '%s -c help' for information on available commands.\n" +"\n" +QEMU_BUGREPORTS "\n", name, name); } diff --git a/qemu-nbd.c b/qemu-nbd.c index b8666bb575..052eb4d067 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c @@ -123,7 +123,7 @@ static void usage(const char *name) " --detect-zeroes=MODE set detect-zeroes mode (off, on, unmap)\n" " --image-opts treat FILE as a full set of image options\n" "\n" -"Report bugs to <qemu-devel@nongnu.org>\n" +QEMU_BUGREPORTS "\n" , name, NBD_DEFAULT_PORT, "DEVICE"); } diff --git a/qga/main.c b/qga/main.c index b64c7ac2a2..56d5633c13 100644 --- a/qga/main.c +++ b/qga/main.c @@ -249,7 +249,7 @@ QEMU_COPYRIGHT "\n" " options / command-line parameters to stdout\n" " -h, --help display this help and exit\n" "\n" -"Report bugs to <mdroth@linux.vnet.ibm.com>\n" +QEMU_BUGREPORTS "\n" , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, dfl_pathnames.pidfile, #ifdef CONFIG_FSFREEZE -- 2.13.3 ^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output. 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output Eric Blake @ 2017-08-02 12:46 ` Daniel P. Berrange 2017-08-03 16:21 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 13+ messages in thread From: Daniel P. Berrange @ 2017-08-02 12:46 UTC (permalink / raw) To: Eric Blake Cc: qemu-devel, kwolf, peter.maydell, Michael Roth, qemu-block, Riku Voipio, Laurent Vivier, mreitz, pbonzini On Fri, Jul 28, 2017 at 11:47:08AM -0500, Eric Blake wrote: > These days, many programs are including a bug-reporting address, > or better yet, a link to the project web site, at the tail of > their --help output. However, we were not very consistent at > doing so: only qemu-nbd and qemu-qa mentioned anything, with the > latter pointing to an individual person instead of the project. > > Add a new #define that sets up a uniform string, mentioning both > bug reporting instructions and overall project details, and which > a downstream vendor could tweak if they want bugs to go to a > downstream database. Then use it in all of our binaries which > have --help output. > > The canned text intentionally references http:// instead of https:// > because our https website currently causes certificate errors in > some browsers. That can be tweaked later once we have resolved the > web site issued. > > Signed-off-by: Eric Blake <eblake@redhat.com> > --- > > v2: tweak text to capitalize QEMU and use consistent trailing . > > include/qemu-common.h | 5 +++++ > vl.c | 4 +++- > bsd-user/main.c | 2 ++ > linux-user/main.c | 4 +++- > qemu-img.c | 2 +- > qemu-io.c | 5 +++-- > qemu-nbd.c | 2 +- > qga/main.c | 2 +- > 8 files changed, 19 insertions(+), 7 deletions(-) Reviewed-by: Daniel P. Berrange <berrange@redhat.com> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output. 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output Eric Blake 2017-08-02 12:46 ` Daniel P. Berrange @ 2017-08-03 16:21 ` Philippe Mathieu-Daudé 1 sibling, 0 replies; 13+ messages in thread From: Philippe Mathieu-Daudé @ 2017-08-03 16:21 UTC (permalink / raw) To: Eric Blake, qemu-devel Cc: kwolf, peter.maydell, Michael Roth, qemu-block, Riku Voipio, Laurent Vivier, mreitz, pbonzini On 07/28/2017 01:47 PM, Eric Blake wrote: > These days, many programs are including a bug-reporting address, > or better yet, a link to the project web site, at the tail of > their --help output. However, we were not very consistent at > doing so: only qemu-nbd and qemu-qa mentioned anything, with the > latter pointing to an individual person instead of the project. > > Add a new #define that sets up a uniform string, mentioning both > bug reporting instructions and overall project details, and which > a downstream vendor could tweak if they want bugs to go to a > downstream database. Then use it in all of our binaries which > have --help output. > > The canned text intentionally references http:// instead of https:// > because our https website currently causes certificate errors in > some browsers. That can be tweaked later once we have resolved the > web site issued. > > Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > > v2: tweak text to capitalize QEMU and use consistent trailing . > > include/qemu-common.h | 5 +++++ > vl.c | 4 +++- > bsd-user/main.c | 2 ++ > linux-user/main.c | 4 +++- > qemu-img.c | 2 +- > qemu-io.c | 5 +++-- > qemu-nbd.c | 2 +- > qga/main.c | 2 +- > 8 files changed, 19 insertions(+), 7 deletions(-) > > diff --git a/include/qemu-common.h b/include/qemu-common.h > index b5adbfa5e9..d29045631f 100644 > --- a/include/qemu-common.h > +++ b/include/qemu-common.h > @@ -22,6 +22,11 @@ > #define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \ > "Fabrice Bellard and the QEMU Project developers" > > +/* Bug reporting information for --help arguments, About dialogs, etc */ > +#define QEMU_BUGREPORTS \ > + "See <http://qemu.org/contribute/report-a-bug> for bug reports.\n" \ > + "More information on the QEMU project at <http://qemu.org>." > + > /* main function, renamed */ > #if defined(CONFIG_COCOA) > int qemu_main(int argc, char **argv, char **envp); > diff --git a/vl.c b/vl.c > index fb6b2efafa..b824f81f64 100644 > --- a/vl.c > +++ b/vl.c > @@ -1942,7 +1942,9 @@ static void help(int exitcode) > "ctrl-alt-n switch to virtual console 'n'\n" > "ctrl-alt toggle mouse and keyboard grab\n" > "\n" > - "When using -nographic, press 'ctrl-a h' to get some help.\n"); > + "When using -nographic, press 'ctrl-a h' to get some help.\n" > + "\n" > + QEMU_BUGREPORTS "\n"); > > exit(exitcode); > } > diff --git a/bsd-user/main.c b/bsd-user/main.c > index 501e16f675..4db10cb376 100644 > --- a/bsd-user/main.c > +++ b/bsd-user/main.c > @@ -686,6 +686,8 @@ static void usage(void) > " -E var1=val2 -E var2=val2 -U LD_PRELOAD -U LD_DEBUG\n" > "Note that if you provide several changes to single variable\n" > "last change will stay in effect.\n" > + "\n" > + QEMU_BUGREPORTS "\n" > , > TARGET_NAME, > interp_prefix, > diff --git a/linux-user/main.c b/linux-user/main.c > index 2b38d39d87..7d6e481277 100644 > --- a/linux-user/main.c > +++ b/linux-user/main.c > @@ -4136,7 +4136,9 @@ static void usage(int exitcode) > " -E var1=val2,var2=val2 -U LD_PRELOAD,LD_DEBUG\n" > " QEMU_SET_ENV=var1=val2,var2=val2 QEMU_UNSET_ENV=LD_PRELOAD,LD_DEBUG\n" > "Note that if you provide several changes to a single variable\n" > - "the last change will stay in effect.\n"); > + "the last change will stay in effect.\n" > + "\n" > + QEMU_BUGREPORTS "\n"); > > exit(exitcode); > } > diff --git a/qemu-img.c b/qemu-img.c > index f4d5f0d77d..758719e083 100644 > --- a/qemu-img.c > +++ b/qemu-img.c > @@ -201,7 +201,7 @@ static void QEMU_NORETURN help(void) > > printf("%s\nSupported formats:", help_msg); > bdrv_iterate_format(format_print, NULL); > - printf("\n"); > + printf("\n\n" QEMU_BUGREPORTS "\n"); > exit(EXIT_SUCCESS); > } > > diff --git a/qemu-io.c b/qemu-io.c > index ec175630a6..b93553a603 100644 > --- a/qemu-io.c > +++ b/qemu-io.c > @@ -262,8 +262,9 @@ static void usage(const char *name) > " -h, --help display this help and exit\n" > " -V, --version output version information and exit\n" > "\n" > -"See '%s -c help' for information on available commands." > -"\n", > +"See '%s -c help' for information on available commands.\n" > +"\n" > +QEMU_BUGREPORTS "\n", > name, name); > } > > diff --git a/qemu-nbd.c b/qemu-nbd.c > index b8666bb575..052eb4d067 100644 > --- a/qemu-nbd.c > +++ b/qemu-nbd.c > @@ -123,7 +123,7 @@ static void usage(const char *name) > " --detect-zeroes=MODE set detect-zeroes mode (off, on, unmap)\n" > " --image-opts treat FILE as a full set of image options\n" > "\n" > -"Report bugs to <qemu-devel@nongnu.org>\n" > +QEMU_BUGREPORTS "\n" > , name, NBD_DEFAULT_PORT, "DEVICE"); > } > > diff --git a/qga/main.c b/qga/main.c > index b64c7ac2a2..56d5633c13 100644 > --- a/qga/main.c > +++ b/qga/main.c > @@ -249,7 +249,7 @@ QEMU_COPYRIGHT "\n" > " options / command-line parameters to stdout\n" > " -h, --help display this help and exit\n" > "\n" > -"Report bugs to <mdroth@linux.vnet.ibm.com>\n" > +QEMU_BUGREPORTS "\n" > , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, > dfl_pathnames.pidfile, > #ifdef CONFIG_FSFREEZE > ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2017-08-03 16:21 UTC | newest] Thread overview: 13+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-07-28 16:47 [Qemu-devel] [PATCH v2 for-2.10 0/4] improved --version/--help tweaks Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 1/4] qemu-img: Sort sub-command names in --help Eric Blake 2017-08-02 12:42 ` Daniel P. Berrange 2017-08-03 15:14 ` Kevin Wolf 2017-08-03 15:30 ` Eric Blake 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 2/4] qemu-io: Give more --version information Eric Blake 2017-08-02 12:44 ` Daniel P. Berrange 2017-08-03 15:16 ` Kevin Wolf 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 3/4] qga: " Eric Blake 2017-08-02 12:45 ` Daniel P. Berrange 2017-07-28 16:47 ` [Qemu-devel] [PATCH v2 4/4] maint: Include bug-reporting info in --help output Eric Blake 2017-08-02 12:46 ` Daniel P. Berrange 2017-08-03 16:21 ` Philippe Mathieu-Daudé
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).