mirror of
https://github.com/akuker/RASCSI.git
synced 2025-01-10 17:30:47 +00:00
Updated LUN handling
This commit is contained in:
parent
81f11b6dc2
commit
fcedbf1e1d
@ -247,7 +247,14 @@ void SCSIDEV::Execute()
|
||||
}
|
||||
|
||||
try {
|
||||
ctrl.device = ctrl.unit[GetLun()];
|
||||
// TODO Verify LUN handling
|
||||
if ((SCSIDEV::scsi_command)ctrl.cmd[0] == eCmdInquiry) {
|
||||
// Use LUN0 for INQUIRY because LUN0 is assumbed to be always available
|
||||
ctrl.device = ctrl.unit[0];
|
||||
}
|
||||
else {
|
||||
ctrl.device = ctrl.unit[GetLun()];
|
||||
}
|
||||
}
|
||||
catch (const lun_exception& e) {
|
||||
LOGINFO("%s Invalid LUN %d for ID %d", __PRETTY_FUNCTION__, e.getlun(), GetSCSIID());
|
||||
|
@ -1185,9 +1185,6 @@ Disk::Disk(const std::string id) : BlockDevice(id)
|
||||
disk.dcache = NULL;
|
||||
disk.imgoffset = 0;
|
||||
|
||||
// Other
|
||||
cache_wb = TRUE;
|
||||
|
||||
AddCommand(SCSIDEV::eCmdTestUnitReady, "CmdTestUnitReady", &Disk::TestUnitReady);
|
||||
AddCommand(SCSIDEV::eCmdRezero, "CmdRezero", &Disk::Rezero);
|
||||
AddCommand(SCSIDEV::eCmdRequestSense, "CmdRequestSense", &Disk::RequestSense);
|
||||
|
@ -248,7 +248,6 @@ protected:
|
||||
|
||||
// Internal data
|
||||
disk_t disk; // Internal disk data
|
||||
BOOL cache_wb; // Cache mode
|
||||
|
||||
private:
|
||||
void AddCommand(SCSIDEV::scsi_command, const char*, void (Disk::*)(SASIDEV *));
|
||||
|
Loading…
x
Reference in New Issue
Block a user