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

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