|
|
3beab2 |
From c8cdce47bc38d2f59ecc4b75d6db7f032b63d527 Mon Sep 17 00:00:00 2001
|
|
|
3beab2 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
3beab2 |
Date: Tue, 18 Jan 2022 20:49:21 +0000
|
|
|
3beab2 |
Subject: [PATCH] vddk: Allow create-hwversion to be specified as a number
|
|
|
3beab2 |
|
|
|
3beab2 |
This gives us a bit of future-proofing so we don't always need to add
|
|
|
3beab2 |
new hardware versions immediately. Another reason for this is that
|
|
|
3beab2 |
VDDK allows you to specify seemingly any number here without
|
|
|
3beab2 |
complaint.
|
|
|
3beab2 |
|
|
|
3beab2 |
Updates: commit a39d5773afc3ebab7e5768118a2bccb89a654585
|
|
|
3beab2 |
(cherry picked from commit 071e32927237c2c00d78684c8a0f2e5fbca9963e)
|
|
|
3beab2 |
---
|
|
|
3beab2 |
plugins/vddk/nbdkit-vddk-plugin.pod | 8 ++++++--
|
|
|
3beab2 |
plugins/vddk/vddk.c | 3 ++-
|
|
|
3beab2 |
2 files changed, 8 insertions(+), 3 deletions(-)
|
|
|
3beab2 |
|
|
|
3beab2 |
diff --git a/plugins/vddk/nbdkit-vddk-plugin.pod b/plugins/vddk/nbdkit-vddk-plugin.pod
|
|
|
3beab2 |
index 6c7ae989..e6972900 100644
|
|
|
3beab2 |
--- a/plugins/vddk/nbdkit-vddk-plugin.pod
|
|
|
3beab2 |
+++ b/plugins/vddk/nbdkit-vddk-plugin.pod
|
|
|
3beab2 |
@@ -195,10 +195,14 @@ Specify the VMDK disk adapter type. The default is C<scsi-buslogic>.
|
|
|
3beab2 |
|
|
|
3beab2 |
=item B<create-hwversion=esx65>
|
|
|
3beab2 |
|
|
|
3beab2 |
+=item B<create-hwversion=>N
|
|
|
3beab2 |
+
|
|
|
3beab2 |
(nbdkit E<ge> 1.30)
|
|
|
3beab2 |
|
|
|
3beab2 |
-Specify the VMDK virtual hardware version. The default is
|
|
|
3beab2 |
-C<workstation5>.
|
|
|
3beab2 |
+Specify the VMDK virtual hardware version. You can give either the
|
|
|
3beab2 |
+named version or the equivalent 16 bit number.
|
|
|
3beab2 |
+
|
|
|
3beab2 |
+The default is C<workstation5> (N = 4).
|
|
|
3beab2 |
|
|
|
3beab2 |
=item B<create-size=>SIZE
|
|
|
3beab2 |
|
|
|
3beab2 |
diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c
|
|
|
3beab2 |
index 5ebf9a2c..bab8de6f 100644
|
|
|
3beab2 |
--- a/plugins/vddk/vddk.c
|
|
|
3beab2 |
+++ b/plugins/vddk/vddk.c
|
|
|
3beab2 |
@@ -192,7 +192,8 @@ vddk_config (const char *key, const char *value)
|
|
|
3beab2 |
create_hwversion = VIXDISKLIB_HWVERSION_ESX60;
|
|
|
3beab2 |
else if (strcmp (value, "esx65") == 0)
|
|
|
3beab2 |
create_hwversion = VIXDISKLIB_HWVERSION_ESX65;
|
|
|
3beab2 |
- else {
|
|
|
3beab2 |
+ else if (nbdkit_parse_uint16_t ("create-hwversion", value,
|
|
|
3beab2 |
+ &create_hwversion) == -1) {
|
|
|
3beab2 |
nbdkit_error ("unknown create-hwversion: %s", value);
|
|
|
3beab2 |
return -1;
|
|
|
3beab2 |
}
|
|
|
3beab2 |
--
|
|
|
3beab2 |
2.31.1
|
|
|
3beab2 |
|