| 78 | } |
| 79 | |
| 80 | int HostServices::ModeSense6(cdb_t cdb, vector<uint8_t>& buf) const |
| 81 | { |
| 82 | // Block descriptors cannot be returned |
| 83 | if (!(cdb[1] & 0x08)) { |
| 84 | throw scsi_exception(sense_key::illegal_request, asc::invalid_field_in_cdb); |
| 85 | } |
| 86 | |
| 87 | const auto length = static_cast<int>(min(buf.size(), static_cast<size_t>(cdb[4]))); |
| 88 | fill_n(buf.begin(), length, 0); |
| 89 | |
| 90 | // 4 bytes basic information |
| 91 | const int size = AddModePages(cdb, buf, 4, length, 255); |
| 92 | |
| 93 | buf[0] = (uint8_t)size; |
| 94 | |
| 95 | return size; |
| 96 | } |
| 97 | |
| 98 | int HostServices::ModeSense10(cdb_t cdb, vector<uint8_t>& buf) const |
| 99 | { |
nothing calls this directly
no test coverage detected