[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1382193559-12549-10-git-send-email-dominik.paulus@fau.de>
Date: Sat, 19 Oct 2013 16:39:12 +0200
From: Dominik Paulus <dominik.paulus@....de>
To: Dan Carpenter <dan.carpenter@...cle.com>
Cc: Dominik Paulus <dominik.paulus@....de>,
Tobias Polzer <tobias.polzer@....de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Anthony Foiani <anthony.foiani@...il.com>,
devel@...verdev.osuosl.org, linux-kernel@...cs.fau.de,
Kurt Kanzenbach <ly80toro@....cs.fau.de>,
linux-kernel@...r.kernel.org, tobias.polzer@....de,
Ilija Hadzic <ihadzic@...earch.bell-labs.com>
Subject: [PATCHv4 09/16] staging: usbip: Separate protocol/program version
Not all new program versions necessarily introduce
non-backwards-compatible protocol changes. We thus move the definition
of the protocol version from configure.ac to usbip_network.h, where it
logically belongs to.
Signed-off-by: Dominik Paulus <dominik.paulus@....de>
Signed-off-by: Tobias Polzer <tobias.polzer@....de>
---
drivers/staging/usbip/userspace/configure.ac | 1 -
drivers/staging/usbip/userspace/src/usbip_network.c | 6 +++---
drivers/staging/usbip/userspace/src/usbip_network.h | 6 ++++++
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/usbip/userspace/configure.ac b/drivers/staging/usbip/userspace/configure.ac
index 2208516..bc08b81 100644
--- a/drivers/staging/usbip/userspace/configure.ac
+++ b/drivers/staging/usbip/userspace/configure.ac
@@ -2,7 +2,6 @@ dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([usbip-utils], [1.1.1], [linux-usb@...r.kernel.org])
-AC_DEFINE([USBIP_VERSION], [0x00000111], [binary-coded decimal version number])
CURRENT=0
REVISION=1
diff --git a/drivers/staging/usbip/userspace/src/usbip_network.c b/drivers/staging/usbip/userspace/src/usbip_network.c
index e573cb2..a606e2b 100644
--- a/drivers/staging/usbip/userspace/src/usbip_network.c
+++ b/drivers/staging/usbip/userspace/src/usbip_network.c
@@ -156,7 +156,7 @@ int usbip_net_send_op_common(int sockfd, uint32_t code, uint32_t status)
memset(&op_common, 0, sizeof(op_common));
- op_common.version = USBIP_VERSION;
+ op_common.version = PROTOCOL_VERSION;
op_common.code = code;
op_common.status = status;
@@ -186,9 +186,9 @@ int usbip_net_recv_op_common(int sockfd, uint16_t *code)
PACK_OP_COMMON(0, &op_common);
- if (op_common.version != USBIP_VERSION) {
+ if (op_common.version != PROTOCOL_VERSION) {
dbg("version mismatch: %d %d", op_common.version,
- USBIP_VERSION);
+ PROTOCOL_VERSION);
return -ERR_MISMATCH;
}
diff --git a/drivers/staging/usbip/userspace/src/usbip_network.h b/drivers/staging/usbip/userspace/src/usbip_network.h
index d3c1b71..6a41fd8 100644
--- a/drivers/staging/usbip/userspace/src/usbip_network.h
+++ b/drivers/staging/usbip/userspace/src/usbip_network.h
@@ -14,6 +14,12 @@
#include <stdint.h>
+/*
+ * Protocol version. Incremented only on non-backwards-compatible
+ * changes.
+ */
+#define PROTOCOL_VERSION 0x111
+
extern int usbip_port;
extern char *usbip_port_string;
extern char *usbip_srp_password;
--
1.8.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists