qemu-img: Add --pkgversion common option
PATCH 1/1 qemu-img: Add --pkgversion common option
This will output the QEMU_PKGVERSION which is set by configure's --with-pkgversion=
--- qemu-img.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
qemu-img.c +11 -0
@@ -3064,6 +3064,17 @@ int main(int argc, char **argv) } cmdname = argv[1 ]; +/* Report pkgversion */ +if (!strcmp (cmdname,"--pkgversion" )) { + argc--; argv++;/* Drop special arg. */ +printf ("qemu-img version " QEMU_VERSION +" pkgversion " QEMU_PKGVERSION "\n" ); +if (argc <2 ) { +return 0 ; + } + cmdname = argv[1 ];/* Update */ + } +/* find the command */ for (cmd = img_cmds; cmd->name !=NULL ; cmd++) {if (!strcmp (cmdname, cmd->name)) {
Signature · 1 line
1.8.4
qemu-img.c int main(int argc, char **argv) · line 3076
Quoted 13 lines · Don Slutz
This will output the
QEMU_PKGVERSIONwhich is set by configure's --with-pkgversion=qemu-img.c +10
-0+/* Report pkgversion */ +if (!strcmp (cmdname,"--pkgversion" )) { + argc--; argv++;/* Drop special arg. */ +printf ("qemu-img version " QEMU_VERSION +" pkgversion " QEMU_PKGVERSION "\n" ); +if (argc <2 ) { +return 0 ; + } + cmdname = argv[1 ];/* Update */ + }
Wouldn't it be better to just report the QEMU_PKGVERSION as part of the version info we already report in --version? This would be consistent with both linux-user and the softmmu emulators, which do:
printf("QEMU emulator version " QEMU_VERSION QEMU_PKGVERSION ",
Copyright (c) 2003-2008 Fabrice Bellard\n");
-- PMM
Quoted 15 lines · Peter Maydell
qemu-img.c int main(int argc, char **argv) · line 3076
Quoted 13 lines · Don Slutz
This will output the
QEMU_PKGVERSIONwhich is set by configure's --with-pkgversion=qemu-img.c +10
-0+/* Report pkgversion */ +if (!strcmp (cmdname,"--pkgversion" )) { + argc--; argv++;/* Drop special arg. */ +printf ("qemu-img version " QEMU_VERSION +" pkgversion " QEMU_PKGVERSION "\n" ); +if (argc <2 ) { +return 0 ; + } + cmdname = argv[1 ];/* Update */ + }
Quoted 7 lines
Wouldn't it be better to just report the
QEMU_PKGVERSIONas part of the version info we already report in --version? This would be consistent with both linux-user and the softmmu emulators, which do:printf("QEMU emulator version "
QEMU_VERSIONQEMU_PKGVERSION",
Copyright (c) 2003-2008 Fabrice Bellard\n");
I agree - output the information unconditionally on --version, rather than inventing a new option.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
On 01/09/2015 08:28 AM, Don Slutz wrote:
[an encrypted message]
Oops, you probably want to fix your Thunderbird/Enigmail settings to sign but not encrypt when a list is involved.
Signature · 2 lines
Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Sigh. Will look into this.
-Don Slutz
Quoted 7 lines · Eric Blake
On 01/09/2015 08:28 AM, Don Slutz wrote:
[an encrypted message]
Oops, you probably want to fix your Thunderbird/Enigmail settings to sign but not encrypt when a list is involved.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iQIcBAEBAgAGBQJUsBfAAAoJEHkofi8zcwBkiEwQAJRHWVs/355i9x5S8/zb6S1c G2WEkcXPgy6/hidX2rtAB37fCT7+DkYtQq94pOXfhkIVlXhuTk5VX4tBfSKiZFPz LtLoKXxfWMG/pcU3xQKrpW32ZIwafYfbYhSs/0LIIy4kyiEHJZ4AQ8GztRin/MRu H8EF9QZOxR8W3934lHiU5J+qlp5ShIH2/1AUwXmr+P9tFjyldcJlo+Zv2PXdv2Zg St7Z2WB0BlacA8i0rSo9I9lYDaVWPzxBqkRJMyCz8lqUC5KTMk+qend9H9VVsdkW gpSYvyrf73rUMqauY6boJZjJxl5SiVktaTmxDkkOqQHH3wynryogEt85lywpNB2C 0v+isTvSou5qThVgMbPF6LOg5KzHoHYO5BPVjq9VIRVGsr2fHNkSLIHQ8YKKLnJO vZGZSftozrcD+A4C2rWmYlKr/rTFaEYKLjd7K2U+oak2xWrFX2h/cd0lyY7syF29 i54Bcku91wFigymgJJ6BuSkIlsM+rPSuOF3UTPqLqIfKx/EjeanBtGlzR/vIGzvU 7wvOQPs0RtULmms6vPDpw8ZmQb+T2PVvFf4jmpknuRt/Wokxoyl+sNL5msmcgTzb x0k+0TPhIvsvUo3HYoorGoaRZyZYgk6podL11uMCFr7Iq/Y+kqo2hUnG610bH5c5 s7w+oERv382PKof37RM6
=KSVr
-----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 2 lines · Don Slutz
Sigh. Will look into this. -Don Slutz
Here is what I said (un-encrypeted):
Quoted 5 lines · Eric Blake
Quoted 4 lines · Peter Maydell
On 8 January 2015 at 14:30, Don Slutz <[email protected]> wrote:
Quoted 9 lines
Quoted 4 lines
Wouldn't it be better to just report the
QEMU_PKGVERSIONas part of the version info we already report in --version? This would be consistent with both linux-user and the softmmu emulators, which do:I agree - output the information unconditionally on --version, rather than inventing a new option.
Will do. Have send out a v2.
-Don Slutz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
iQIcBAEBAgAGBQJUsChGAAoJEHkofi8zcwBkpJ4P/ipotMH4W4z3zZOaNKkPwwjp NQzGmxNet4KqRZ32u1GKmSOhitGEpc/2nc0+e/vSPUnY24Tf9pA0vClTl9dJSjJw DYLSyUl0yBIYvjsrt8ozkoD0IrTeDGC20a2/iHeg0935Ep/CcFOYPoCV/MIYbQX9 LwEEIBYa3mHq3scslBMsW/Do4brUjSv1KM9vWhGthoSiGeeXpG0wnjT9X2Y9QLY+ PuuMESYuYsoWtgeD4J2g9QgZ8N5MwtDw5maud4kdgDpD4yG+hQ/b7FGmptGQczxz WSiwIIVhPXJkg121GNDXcUAqAEn3V2qBgYSK/A/oflCTBjw55kalzVI5vDcW14KO VMTebc8wI+g9p3aBweCluezenYPdRgpLU9++14/YyfY5+Z5+hOKs7xOgujto9qWI /jq8AO0Qgpas6tY40lcN7O09Oli0rIXQXOI1feFcxclY5wkydWBBTcZlx8vhaMxi oP0ZT9z8Sp8BorHYpqYaPkQP3AQKCyUX5uI3A9omnNNT6TfcE5+OYPBvEewDvBAz IwwIQ+zWWrYH0SHQOguKg488I/rJSm9jQ8eA/lmBDE+nKiH/nI8zGrxIlAQm8xQh PEQUZj9uJEpEA8RFreSNxtxubCm9Ug83fedcXyg/Pdp3C9i2pkmObVTtlKsJnwEB 5w2hCXXcdNMGGuMRAes/
=1G1f
-----END PGP SIGNATURE-----