| 18 | using namespace scsi_command_util; |
| 19 | |
| 20 | bool PrimaryDevice::Init(const param_map& params) |
| 21 | { |
| 22 | // Mandatory SCSI primary commands |
| 23 | AddCommand(scsi_command::eCmdTestUnitReady, [this] { TestUnitReady(); }); |
| 24 | AddCommand(scsi_command::eCmdInquiry, [this] { Inquiry(); }); |
| 25 | AddCommand(scsi_command::eCmdReportLuns, [this] { ReportLuns(); }); |
| 26 | |
| 27 | // Optional commands supported by all PiSCSI devices |
| 28 | AddCommand(scsi_command::eCmdRequestSense, [this] { RequestSense(); }); |
| 29 | AddCommand(scsi_command::eCmdReserve6, [this] { ReserveUnit(); }); |
| 30 | AddCommand(scsi_command::eCmdRelease6, [this] { ReleaseUnit(); }); |
| 31 | AddCommand(scsi_command::eCmdSendDiagnostic, [this] { SendDiagnostic(); }); |
| 32 | |
| 33 | SetParams(params); |
| 34 | |
| 35 | return true; |
| 36 | } |
| 37 | |
| 38 | void PrimaryDevice::AddCommand(scsi_command cmd, const operation& execute) |
| 39 | { |
nothing calls this directly
no outgoing calls
no test coverage detected