From patchwork Thu Aug 4 11:14:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 73268 Delivered-To: patches@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1333395qga; Thu, 4 Aug 2016 04:14:41 -0700 (PDT) X-Received: by 10.194.107.130 with SMTP id hc2mr64509266wjb.7.1470309278977; Thu, 04 Aug 2016 04:14:38 -0700 (PDT) Return-Path: Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by mx.google.com with ESMTPS id l4si3460894wmf.56.2016.08.04.04.14.38 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Aug 2016 04:14:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) client-ip=2001:8b0:1d0::2; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::2 as permitted sender) smtp.mailfrom=pm215@archaic.org.uk; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from pm215 by orth.archaic.org.uk with local (Exim 4.84_2) (envelope-from ) id 1bVGbl-0007LY-Ca; Thu, 04 Aug 2016 12:14:37 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Stefan Hajnoczi , Eric Blake , Fabrice Bellard Subject: [PATCH v2 for-2.7] Update ancient copyright string in -version output Date: Thu, 4 Aug 2016 12:14:36 +0100 Message-Id: <1470309276-5012-1-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.9.1 Currently the -version command line argument prints a string ending with "Copyright (c) 2003-2008 Fabrice Bellard". This is now some eight years out of date; abstract it out of the several places that print the string and update it to: Copyright (c) 2003-2016 Fabrice Bellard and the QEMU Project developers to reflect the work by all the QEMU Project contributors over the last decade. Signed-off-by: Peter Maydell Acked-by: Stefan Hajnoczi --- The aim here is to (1) update the dates and (2) acknowledge the work of all our contributors. I'm open to bikeshedding on the exact wording (or on which header file we should put the #define in...) I only pulled out the copyright string proper into the #define because a GUI About box is going to want just that, with no leading ',' or trailing newline. Fabrice: I have cc'd you since this is proposing an update to your copyright info. v1->v2 changes: add the qemu-img.c string. --- bsd-user/main.c | 3 ++- include/qemu-common.h | 4 ++++ linux-user/main.c | 2 +- qemu-img.c | 2 +- vl.c | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) -- 1.9.1 diff --git a/bsd-user/main.c b/bsd-user/main.c index bbba43f..b4a0a00 100644 --- a/bsd-user/main.c +++ b/bsd-user/main.c @@ -667,7 +667,8 @@ void cpu_loop(CPUSPARCState *env) static void usage(void) { - printf("qemu-" TARGET_NAME " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n" + printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION + ", " QEMU_COPYRIGHT "\n" "usage: qemu-" TARGET_NAME " [options] program [arguments...]\n" "BSD CPU emulator (compiled for %s emulation)\n" "\n" diff --git a/include/qemu-common.h b/include/qemu-common.h index 1f2cb94..9e8b0bd 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @@ -18,6 +18,10 @@ #include "qemu/option.h" +/* Copyright string for -version arguments, About dialogs, etc */ +#define QEMU_COPYRIGHT "Copyright (c) 2003-2016 " \ + "Fabrice Bellard and the QEMU Project developers" + /* main function, renamed */ #if defined(CONFIG_COCOA) int qemu_main(int argc, char **argv, char **envp); diff --git a/linux-user/main.c b/linux-user/main.c index 462e820..f2f4d2f 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4000,7 +4000,7 @@ static void handle_arg_strace(const char *arg) static void handle_arg_version(const char *arg) { printf("qemu-" TARGET_NAME " version " QEMU_VERSION QEMU_PKGVERSION - ", Copyright (c) 2003-2008 Fabrice Bellard\n"); + ", " QEMU_COPYRIGHT "\n"); exit(EXIT_SUCCESS); } diff --git a/qemu-img.c b/qemu-img.c index 2e40e1f..def9f96 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -44,7 +44,7 @@ #include #define QEMU_IMG_VERSION "qemu-img version " QEMU_VERSION QEMU_PKGVERSION \ - ", Copyright (c) 2004-2008 Fabrice Bellard\n" + ", " QEMU_COPYRIGHT "\n" typedef struct img_cmd_t { const char *name; diff --git a/vl.c b/vl.c index e7c2c62..57f34d0 100644 --- a/vl.c +++ b/vl.c @@ -1914,7 +1914,8 @@ static void main_loop(void) static void version(void) { - printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n"); + printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION ", " + QEMU_COPYRIGHT "\n"); } static void help(int exitcode)