summaryrefslogtreecommitdiffstats
path: root/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-16 22:55:45 +0000
commit04aecf1372d30eb709d8de65152535ab66dcb74a (patch)
treed1e4d8c453a76465e8b63119314a28d39b474479 /src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
parentAdding upstream version 7.0.14-dfsg. (diff)
downloadvirtualbox-04aecf1372d30eb709d8de65152535ab66dcb74a.tar.xz
virtualbox-04aecf1372d30eb709d8de65152535ab66dcb74a.zip
Adding upstream version 7.0.16-dfsg.upstream/7.0.16-dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h')
-rw-r--r--src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h b/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
index 71924d1d..b4af0cb5 100644
--- a/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
+++ b/src/VBox/Devices/Storage/VSCSI/VSCSIInternal.h
@@ -241,6 +241,25 @@ typedef const VSCSILUNSUPOPC *PCVSCSILUNSUPOPC;
{ a_u8Opc, a_u16SvcAction, VSCSI_LUN_SUP_OPC_SVC_ACTION_REQUIRED, a_pszOpc, a_cbCdb, a_pbCdbUsage, 0, 0, 0}
/** @} */
+/** @name Helper macros to specify a range of not supported CDB opcodes for the entries pointed
+ * to by VSCSILUNDESC::pacbCdbOpc.
+ * @{ */
+#define VSCSI_LUN_CDB_SZ_INVALID 0
+#define VSCSI_LUN_CDB_SZ_INVALID_X2 \
+ VSCSI_LUN_CDB_SZ_INVALID, \
+ VSCSI_LUN_CDB_SZ_INVALID
+#define VSCSI_LUN_CDB_SZ_INVALID_X4 \
+ VSCSI_LUN_CDB_SZ_INVALID_X2, \
+ VSCSI_LUN_CDB_SZ_INVALID_X2
+#define VSCSI_LUN_CDB_SZ_INVALID_X8 \
+ VSCSI_LUN_CDB_SZ_INVALID_X4, \
+ VSCSI_LUN_CDB_SZ_INVALID_X4
+#define VSCSI_LUN_CDB_SZ_INVALID_X16 \
+ VSCSI_LUN_CDB_SZ_INVALID_X8, \
+ VSCSI_LUN_CDB_SZ_INVALID_X8
+/** @} */
+
+
/**
* Virtual SCSI LUN descriptor.
*/
@@ -252,6 +271,9 @@ typedef struct VSCSILUNDESC
const char *pcszDescName;
/** LUN type size */
size_t cbLun;
+ /** Pointer to the array holding the CDB length indexed by the opcode.
+ * A 0 entry means opcode not supported (CDB must be at least 1 byte big). */
+ const uint8_t *pacbCdbOpc;
/** Number of entries in the supported operation codes array. */
uint32_t cSupOpcInfo;
/** Pointer to the array of supported operation codes for the