[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cdi-devel] [PATCH v2 4/9] cdi/scsi: Add support for multiple LUNs



+ One SCSI device may provide multiple LUNs. Add a field for the LUN
  count to cdi_scsi_device.
+ Furthermore, add a field to select the LUN to cdi_scsi_packet.

Signed-off-by: Max Reitz <max@xxxxxxxxxx>
---
 include/cdi/scsi.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/cdi/scsi.h b/include/cdi/scsi.h
index cef96ed..f36f9aa 100644
--- a/include/cdi/scsi.h
+++ b/include/cdi/scsi.h
@@ -24,6 +24,9 @@
 
 /// SCSI-Paket
 struct cdi_scsi_packet {
+    /// LUN to address
+    int lun;
+
     /// Buffer zum Senden oder Empfangen von Daten
     void *buffer;
 
@@ -51,6 +54,9 @@ struct cdi_scsi_device {
 
     /// Geraetetyp, der ueber SCSI angesteuert wird
     cdi_device_type_t type;
+
+    /// Number of LUNs (if 0, there is one)
+    int lun_count;
 };
 
 /// SCSI-Treiber
-- 
2.3.5