Blob Blame History Raw
From f8b15da031cbbc9ec3d21d056cd1cdf673416bbc Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 24 Jul 2018 12:08:41 +0100
Subject: [PATCH] vddk: Remove vimapiver parameter.

VDDK never used this, setting it is useless.

(cherry picked from commit ecface865aa121a601c571831d78f4ea1f0574b8)
---
 plugins/vddk/nbdkit-vddk-plugin.pod | 12 ++----------
 plugins/vddk/vddk.c                 | 20 +++-----------------
 2 files changed, 5 insertions(+), 27 deletions(-)

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