qemu-nbd: don't overlap long option values with short options
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 17 Feb 2016 10:10:21 +0000 (10:10 +0000)
committerKevin Wolf <kwolf@redhat.com>
Mon, 22 Feb 2016 08:50:05 +0000 (09:50 +0100)
When defining values for long options, the normal practice is
to start numbering from 256, to avoid overlap with the range
of valid values for short options.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-nbd.c

index 424e71fe0bc2b734f031beb277db56b1584d16e7..9ccfc130c7dd541c1e8b1b9eea18dd6a1666cee6 100644 (file)
 #include <pthread.h>
 
 #define SOCKET_PATH                "/var/lock/qemu-nbd-%s"
-#define QEMU_NBD_OPT_CACHE         1
-#define QEMU_NBD_OPT_AIO           2
-#define QEMU_NBD_OPT_DISCARD       3
-#define QEMU_NBD_OPT_DETECT_ZEROES 4
-#define QEMU_NBD_OPT_OBJECT        5
-#define QEMU_NBD_OPT_TLSCREDS      6
-#define QEMU_NBD_OPT_IMAGE_OPTS    7
+#define QEMU_NBD_OPT_CACHE         256
+#define QEMU_NBD_OPT_AIO           257
+#define QEMU_NBD_OPT_DISCARD       258
+#define QEMU_NBD_OPT_DETECT_ZEROES 259
+#define QEMU_NBD_OPT_OBJECT        260
+#define QEMU_NBD_OPT_TLSCREDS      261
+#define QEMU_NBD_OPT_IMAGE_OPTS    262
 
 static NBDExport *exp;
 static bool newproto;