Update qemu-nbd version
cover Update qemu-nbd version
陳培泓 reported that 'qemu-nbd -V' was stuck at 0.0.1; fix that, along with a nearby style issue noticed in the process. Not having a useful version number is a bug in my eyes, so I'm proposing this series for 2.10.
Eric Blake (2):
qemu-nbd: Update version string
maint: Reorder include directives for qemu-{nbd,io}
qemu-img.c | 3 ++- qemu-nbd.c | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-)
Signature · 1 line
2.13.3
PATCH 1/2 qemu-nbd: Update version string
qemu-io and qemu-img already mirror the qemu version string, time to make qemu-nbd do the same.
--- qemu-nbd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
qemu-nbd.c +3 -2
@@ -36,6 +36,7 @@#include "io/channel-socket.h" #include "crypto/init.h" #include "trace/control.h" +#include "qemu-version.h" #include <getopt.h> #include <libgen.h>
@@ -129,10 +130,10 @@ static void usage(const char *name)static void version (const char *name) {printf ( -"%s version 0.0.1\n" +"%s " QEMU_VERSION QEMU_PKGVERSION "\n" "Written by Anthony Liguori.\n" "\n" -"Copyright (C) 2006 Anthony Liguori <[email protected]>.\n" +QEMU_COPYRIGHT "\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" , name);
Signature · 1 line
2.13.3
PATCH 2/2 maint: Reorder include directives for qemu-{nbd, io}
In reply to Eric BlakeHACKING recommends listing system includes right after osdep.h, and before any other in-project headers.
--- qemu-img.c | 3 ++- qemu-nbd.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-)
qemu-img.c +2 -1
@@ -22,6 +22,8 @@* THE SOFTWARE. */ #include "qemu/osdep.h" +#include <getopt.h> +#include "qemu-version.h" #include "qapi/error.h" #include "qapi/util.h"
@@ -43,7 +45,6 @@#include "block/qapi.h" #include "crypto/init.h" #include "trace/control.h" -#include <getopt.h> #define QEMU_IMG_VERSION "qemu-img version " QEMU_VERSION QEMU_PKGVERSION \ "\n" QEMU_COPYRIGHT "\n"
qemu-nbd.c +4 -4
@@ -17,6 +17,10 @@*/ #include "qemu/osdep.h" +#include <getopt.h> +#include <libgen.h> +#include <pthread.h> +#include "qapi/error.h" #include "qemu-common.h" #include "qemu/cutils.h"
@@ -38,10 +42,6 @@#include "trace/control.h" #include "qemu-version.h" -#include <getopt.h> -#include <libgen.h> -#include <pthread.h> -#define SOCKET_PATH "/var/lock/qemu-nbd-%s"#define QEMU_NBD_OPT_CACHE 256#define QEMU_NBD_OPT_AIO 257
Signature · 1 line
2.13.3
Re: [Qemu-devel] [PATCH 1/2] qemu-nbd: Update version string
In reply to Eric BlakeQuoted 22 lines · Eric Blake
qemu-io and qemu-img already mirror the qemu version string, time to make qemu-nbd do the same.
Reported-by 陳培泓 <[email protected]>Signed-off-by Eric Blake <[email protected]>--- qemu-nbd.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)qemu-nbd.c +1
-0@@ -36,6 +36,7 @@#include "io/channel-socket.h" #include "crypto/init.h" #include "trace/control.h" +#include "qemu-version.h" #include <getopt.h> #include <libgen.h>
qemu-nbd.c static void usage(const char *name) · line 133
Quoted 5 lines
qemu-nbd.c +1
-1@@ -129,10 +130,10 @@ static void usage(const char *name)static void version (const char *name) {printf ( -"%s version 0.0.1\n" +"%s " QEMU_VERSION QEMU_PKGVERSION "\n"
wow, suprised that bogus version has existed for so long :-)
qemu-nbd.c static void usage(const char *name) · line 139
Quoted 7 lines
qemu-nbd.c +1
-1"Written by Anthony Liguori.\n" "\n" -"Copyright (C) 2006 Anthony Liguori <[email protected]>.\n" +QEMU_COPYRIGHT "\n" "This is free software; see the source for copying conditions. There is NO\n" "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n" , name);
Regards,
Daniel
Signature · 3 lines
|: 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 :|
Quoted 8 lines · Eric Blake
陳培泓 reported that 'qemu-nbd -V' was stuck at 0.0.1; fix that, along with a nearby style issue noticed in the process. Not having a useful version number is a bug in my eyes, so I'm proposing this series for 2.10.
Eric Blake (2):
qemu-nbd: Update version string
maint: Reorder include directives for qemu-{nbd,io}
Thanks; queued on my NBD branch:git://repo.or.cz/qemu/ericb.git nbd
Quoted 5 lines
qemu-img.c | 3 ++- qemu-nbd.c | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-)
Signature · 3 lines
Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org