]> xenbits.xensource.com Git - pvdrivers/win/xenbus.git/commitdiff
Avoid PDO namespace conflicts...
authorPaul Durrant <paul.durrant@citrix.com>
Wed, 8 Jul 2015 12:53:45 +0000 (13:53 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Wed, 8 Jul 2015 12:53:45 +0000 (13:53 +0100)
...by encoding the driver major version in the upper byte of the
revision.

This clearly implies that any future change in the driver major version
will start a new PDO namespace, but that it almost certainly the correct
thing to do in that case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
src/xenbus/pdo.c

index 8b86f3bda8cd4c7ece669c99723a520fdcd5a92a..58150d0e4385e5784ef7b97687d726d9384d146d 100644 (file)
@@ -48,6 +48,7 @@
 #include "dbg_print.h"
 #include "assert.h"
 #include "util.h"
+#include "version.h"
 
 #define PDO_TAG 'ODP'
 
@@ -402,7 +403,7 @@ PdoSetRevisions(
     ULONG           Revision;
     NTSTATUS        status;
 
-    Revision = 0;
+    Revision = MAJOR_VERSION << 24;
 
     // Enumerate all possible combinations of exported interface versions since v1
     // and add a PDO revsion for each combination that's currently supported. Note that
@@ -460,7 +461,7 @@ PdoSetRevisions(
                                                      "RANGE_SET v%u "
                                                      "CACHE v%u "
                                                      "GNTTAB v%u "
-                                                     "EMULATED v%u\n",
+                                                     "EMULATED v%u "
                                                      "UNPLUG v%u\n",
                                                      Revision,
                                                      Suspend,