Blame SOURCES/0001-vddk-Remove-vimapiver-parameter.patch

b61625
From f8b15da031cbbc9ec3d21d056cd1cdf673416bbc Mon Sep 17 00:00:00 2001
b61625
From: "Richard W.M. Jones" <rjones@redhat.com>
b61625
Date: Tue, 24 Jul 2018 12:08:41 +0100
b61625
Subject: [PATCH] vddk: Remove vimapiver parameter.
b61625
b61625
VDDK never used this, setting it is useless.
b61625
b61625
(cherry picked from commit ecface865aa121a601c571831d78f4ea1f0574b8)
b61625
---
b61625
 plugins/vddk/nbdkit-vddk-plugin.pod | 12 ++----------
b61625
 plugins/vddk/vddk.c                 | 20 +++-----------------
b61625
 2 files changed, 5 insertions(+), 27 deletions(-)
b61625
b61625
diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod
b61625
index 4d9c6e9..c5486a3 100644
b61625
--- a/plugins/vddk/nbdkit-vddk-plugin.pod
b61625
+++ b/plugins/vddk/nbdkit-vddk-plugin.pod
b61625
@@ -10,7 +10,7 @@ nbdkit-vddk-plugin - VMware VDDK plugin for nbdkit
b61625
              [vm=moref=ID] [server=HOSTNAME] [user=USERNAME]
b61625
              [password=PASSWORD | password=- | password=+FILENAME]
b61625
              [cookie=COOKIE] [thumbprint=THUMBPRINT]
b61625
-             [vimapiver=APIVER] [port=PORT] [nfchostport=PORT]
b61625
+             [port=PORT] [nfchostport=PORT]
b61625
              [snapshot=MOREF] [transports=MODE:MODE:...]
b61625
  nbdkit vddk --dump-plugin
b61625
 
b61625
@@ -177,10 +177,7 @@ L
b61625
 
b61625
 =item B<vimapiver=APIVER>
b61625
 
b61625
-Optional.  Specify the VIM API version.  If not given it defaults to
b61625
-the current version.
b61625
-
b61625
-(Only supported in VDDK ≥ 6.5.0)
b61625
+This parameter is ignored for backwards compatibility.
b61625
 
b61625
 =back
b61625
 
b61625
@@ -271,11 +268,6 @@ at runtime.
b61625
 If this is printed then the C<nfchostport=PORT> parameter is supported
b61625
 by this build.
b61625
 
b61625
-=item C<vddk_has_vimapiver=1>
b61625
-
b61625
-If this is printed then the C<vimapiver=APIVER> parameter is supported
b61625
-by this build.
b61625
-
b61625
 =back
b61625
 
b61625
 =head1 DEBUGGING VDDK
b61625
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
b61625
index 8bc1517..7e0590e 100644
b61625
--- a/plugins/vddk/vddk.c
b61625
+++ b/plugins/vddk/vddk.c
b61625
@@ -1,5 +1,5 @@
b61625
 /* nbdkit
b61625
- * Copyright (C) 2013-2017 Red Hat Inc.
b61625
+ * Copyright (C) 2013-2018 Red Hat Inc.
b61625
  * All rights reserved.
b61625
  *
b61625
  * Redistribution and use in source and binary forms, with or without
b61625
@@ -59,7 +59,6 @@ static const char *snapshot_moref = NULL;  /* snapshot */
b61625
 static const char *thumb_print = NULL;     /* thumbprint */
b61625
 static const char *transport_modes = NULL; /* transports */
b61625
 static const char *username = NULL;        /* user */
b61625
-static const char *vim_api_ver = NULL;     /* vimapiver */
b61625
 static const char *vmx_spec = NULL;        /* vm */
b61625
 static int is_remote = 0;
b61625
 
b61625
@@ -208,12 +207,7 @@ vddk_config (const char *key, const char *value)
b61625
     username = value;
b61625
   }
b61625
   else if (strcmp (key, "vimapiver") == 0) {
b61625
-#if HAVE_VIXDISKLIBCONNECTPARAMS_VIMAPIVER
b61625
-    vim_api_ver = value;
b61625
-#else
b61625
-    nbdkit_error ("this version of VDDK is too old to support vimapiver");
b61625
-    return -1;
b61625
-#endif
b61625
+    /* Ignored for backwards compatibility. */
b61625
   }
b61625
   else if (strcmp (key, "vm") == 0) {
b61625
     vmx_spec = value;
b61625
@@ -248,8 +242,7 @@ vddk_config_complete (void)
b61625
     cookie ||
b61625
     thumb_print ||
b61625
     port ||
b61625
-    nfc_host_port ||
b61625
-    vim_api_ver;
b61625
+    nfc_host_port;
b61625
 
b61625
   if (is_remote) {
b61625
 #define missing(test, param)                                            \
b61625
@@ -281,10 +274,6 @@ vddk_dump_plugin (void)
b61625
   printf ("vddk_has_nfchostport=1\n");
b61625
 #endif
b61625
 
b61625
-#if HAVE_VIXDISKLIBCONNECTPARAMS_VIMAPIVER
b61625
-  printf ("vddk_has_vimapiver=1\n");
b61625
-#endif
b61625
-
b61625
   /* XXX We really need to print the version of the dynamically
b61625
    * linked library here, but VDDK does not provide it.
b61625
    */
b61625
@@ -337,9 +326,6 @@ vddk_open (int readonly)
b61625
 #if HAVE_VIXDISKLIBCONNECTPARAMS_NFCHOSTPORT
b61625
     params.nfcHostPort = nfc_host_port;
b61625
 #endif
b61625
-#if HAVE_VIXDISKLIBCONNECTPARAMS_VIMAPIVER
b61625
-    params.vimApiVer = (char *) vim_api_ver;
b61625
-#endif
b61625
   }
b61625
 
b61625
   /* XXX Some documentation suggests we should call
b61625
-- 
b61625
1.8.3.1
b61625