From nobody Sun May 5 19:33:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501077963017433.8503769228811; Wed, 26 Jul 2017 07:06:03 -0700 (PDT) Received: from localhost ([::1]:38365 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daMwp-0006lt-I7 for importer@patchew.org; Wed, 26 Jul 2017 10:05:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daMta-00046a-A1 for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:02:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daMtU-0003s8-QR for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:02:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56156) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daMtO-0003pK-Jk; Wed, 26 Jul 2017 10:02:26 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7732A883B9; Wed, 26 Jul 2017 14:02:25 +0000 (UTC) Received: from red.redhat.com (ovpn-121-48.rdu2.redhat.com [10.10.121.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5859A6F451; Wed, 26 Jul 2017 14:02:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7732A883B9 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com From: Eric Blake To: qemu-devel@nongnu.org Date: Wed, 26 Jul 2017 09:02:16 -0500 Message-Id: <20170726140218.15904-2-eblake@redhat.com> In-Reply-To: <20170726140218.15904-1-eblake@redhat.com> References: <20170726140218.15904-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 26 Jul 2017 14:02:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/3] qemu-io: Give more --version information X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , pbonzini@redhat.com, "open list:Block layer core" , Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Include the package version information (useful for detecting builds from git or downstream backports), and the copyright notice. Signed-off-by: Eric Blake --- 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 =3D 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); --=20 2.13.3 From nobody Sun May 5 19:33:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501077858372638.5230992117044; Wed, 26 Jul 2017 07:04:18 -0700 (PDT) Received: from localhost ([::1]:38354 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daMv8-0005RS-04 for importer@patchew.org; Wed, 26 Jul 2017 10:04:14 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daMtU-00041d-VV for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:02:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daMtT-0003rb-TK for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:02:33 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45996) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daMtT-0003rO-Nd for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:02:31 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9E329C04D288; Wed, 26 Jul 2017 14:02:30 +0000 (UTC) Received: from red.redhat.com (ovpn-121-48.rdu2.redhat.com [10.10.121.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id A83CA6F451; Wed, 26 Jul 2017 14:02:25 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 9E329C04D288 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com From: Eric Blake To: qemu-devel@nongnu.org Date: Wed, 26 Jul 2017 09:02:17 -0500 Message-Id: <20170726140218.15904-3-eblake@redhat.com> In-Reply-To: <20170726140218.15904-1-eblake@redhat.com> References: <20170726140218.15904-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 26 Jul 2017 14:02:30 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/3] qga: Give more --version information X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, Michael Roth Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Include the package version information (useful for detecting builds from git or downstream backports), and the copyright notice. Signed-off-by: Eric Blake --- 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 -p ] []\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 def= ault)\n" @@ -248,7 +250,7 @@ static void usage(const char *cmd) " -h, --help display this help and exit\n" "\n" "Report bugs to \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, --=20 2.13.3 From nobody Sun May 5 19:33:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1501077976440225.7026754944386; Wed, 26 Jul 2017 07:06:16 -0700 (PDT) Received: from localhost ([::1]:38366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daMx2-0006tn-Ve for importer@patchew.org; Wed, 26 Jul 2017 10:06:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1daMto-0004IQ-Na for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:03:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1daMtn-00042W-Jv for qemu-devel@nongnu.org; Wed, 26 Jul 2017 10:02:52 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38174) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1daMta-0003vV-UN; Wed, 26 Jul 2017 10:02:39 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BE029E313F; Wed, 26 Jul 2017 14:02:37 +0000 (UTC) Received: from red.redhat.com (ovpn-121-48.rdu2.redhat.com [10.10.121.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD1827DE4B; Wed, 26 Jul 2017 14:02:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BE029E313F Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=eblake@redhat.com From: Eric Blake To: qemu-devel@nongnu.org Date: Wed, 26 Jul 2017 09:02:18 -0500 Message-Id: <20170726140218.15904-4-eblake@redhat.com> In-Reply-To: <20170726140218.15904-1-eblake@redhat.com> References: <20170726140218.15904-1-eblake@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 26 Jul 2017 14:02:38 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/3] maint: Include bug-reporting info in --help output. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , "open list:Block layer core" , Riku Voipio , Michael Roth , Laurent Vivier , pbonzini@redhat.com, Max Reitz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- 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..e751361458 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 for bug reports.\n" \ + "More information on the qemu project at " + /* 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=3Dval2 -E var2=3Dval2 -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=3Dval2,var2=3Dval2 -U LD_PRELOAD,LD_DEBUG\n" " QEMU_SET_ENV=3Dvar1=3Dval2,var2=3Dval2 QEMU_UNSET_ENV=3DLD= _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=3DMODE set detect-zeroes mode (off, on, unmap)\n" " --image-opts treat FILE as a full set of image options\n" "\n" -"Report bugs to \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 \n" +QEMU_BUGREPORTS "\n" , cmd, QGA_VIRTIO_PATH_DEFAULT, QGA_SERIAL_PATH_DEFAULT, dfl_pathnames.pidfile, #ifdef CONFIG_FSFREEZE --=20 2.13.3