Skip to content

Commit

Permalink
Get ASCQ
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Jan 23, 2024
1 parent e2c395e commit 3376e1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/s2pexec/s2pexec_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ bool S2pExecExecutor::ExecuteCommand(scsi_command cmd, vector<uint8_t> &cdb, vec

string S2pExecExecutor::GetSenseData(bool sasi)
{
vector<uint8_t> buf(13);
vector<uint8_t> buf(14);
array<uint8_t, 6> cdb = { };
cdb[4] = buf.size();

Expand All @@ -128,6 +128,6 @@ string S2pExecExecutor::GetSenseData(bool sasi)
return "Device reported an error";
}
else {
return FormatSenseData(static_cast<sense_key>(buf[2] & 0x0f), static_cast<asc>(buf[12]));
return FormatSenseData(static_cast<sense_key>(buf[2] & 0x0f), static_cast<asc>(buf[12]), buf[14]);
}
}

0 comments on commit 3376e1f

Please sign in to comment.