Update SmartArrayControllerTool.cpp
This commit is contained in:
parent
114750b9af
commit
30aa1cf2fe
@ -148,7 +148,7 @@ int wmain(int argc, wchar_t* argv[])
|
|||||||
handle,
|
handle,
|
||||||
IOCTL_SCSI_PASS_THROUGH,
|
IOCTL_SCSI_PASS_THROUGH,
|
||||||
&sptwb,
|
&sptwb,
|
||||||
sizeof(SCSI_PASS_THROUGH),
|
sizeof(SCSI_PASS_THROUGH) + sptwb.spt.SenseInfoLength,
|
||||||
&sptwb,
|
&sptwb,
|
||||||
sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS),
|
sizeof(SCSI_PASS_THROUGH_WITH_BUFFERS),
|
||||||
&returned,
|
&returned,
|
||||||
@ -162,7 +162,21 @@ int wmain(int argc, wchar_t* argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::wcerr << L"Failed to send request, error: 0x" << std::hex << GetLastError() << std::endl;
|
const DWORD error = GetLastError();
|
||||||
|
|
||||||
|
std::wstring errorCode = L"Unknown";
|
||||||
|
|
||||||
|
switch (error)
|
||||||
|
{
|
||||||
|
case ERROR_IO_DEVICE:
|
||||||
|
errorCode = L"ERROR_IO_DEVICE";
|
||||||
|
break;
|
||||||
|
case ERROR_INVALID_PARAMETER:
|
||||||
|
errorCode = L"ERROR_INVALID_PARAMETER";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::wcerr << L"Failed to send request, error: " << errorCode << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ACU_REPLAY
|
#ifdef ACU_REPLAY
|
||||||
@ -247,4 +261,4 @@ int wmain(int argc, wchar_t* argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
CloseHandle(handle);
|
CloseHandle(handle);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user