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

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