From 7e563bfb8a5104ff0eed0fff8d13cbe63a25d17c Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 15 Feb 2018 12:06:47 +0100 Subject: Polish the version strings containing the package version Since commit 67a1de0d195a there is no space anymore between the version number and the parentheses when running configure with --with-pkgversion=foo : $ qemu-system-s390x --version QEMU emulator version 2.11.50(foo) But the space is included when building without that option when building from a git checkout: $ qemu-system-s390x --version QEMU emulator version 2.11.50 (v2.11.0-1494-gbec9c64-dirty) The same confusion exists with the "query-version" QMP command. Let's fix this by introducing a proper QEMU_FULL_VERSION definition that includes the space and parentheses, while the QEMU_PKGVERSION should just cleanly contain the package version string itself. Note that this also changes the behavior of the "query-version" QMP command (the space and parentheses are not included there anymore), but that's supposed to be OK since the strings there are not meant to be parsed by other tools. Fixes: 67a1de0d195a6185c39b436159c9ffc7720bf979 Buglink: https://bugs.launchpad.net/qemu/+bug/1673373 Signed-off-by: Thomas Huth Message-Id: <1518692807-25859-1-git-send-email-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- qemu-img.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qemu-img.c') diff --git a/qemu-img.c b/qemu-img.c index 088d89043e..855fa52514 100644 --- a/qemu-img.c +++ b/qemu-img.c @@ -46,7 +46,7 @@ #include "crypto/init.h" #include "trace/control.h" -#define QEMU_IMG_VERSION "qemu-img version " QEMU_VERSION QEMU_PKGVERSION \ +#define QEMU_IMG_VERSION "qemu-img version " QEMU_FULL_VERSION \ "\n" QEMU_COPYRIGHT "\n" typedef struct img_cmd_t { -- cgit v1.2.3