Skip to content

Commit

Permalink
bug: Fixing bug pulling telemetry log
Browse files Browse the repository at this point in the history
Fixing a bug pulling the telemetry log as well as a few other minor clearnup items.

Signed-off-by: Tyler Erickson <[email protected]>
  • Loading branch information
vonericsen committed Jul 26, 2023
1 parent b0f407b commit eb2f1c7
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions utils/C/openSeaChest/openSeaChest_NVMe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1329,6 +1329,7 @@ int32_t main(int argc, char *argv[])
cmdOpts.addr = logBuffer;
cmdOpts.dataLen = size;
cmdOpts.lid = GET_TELEMETRY_IDENTIFIER;
cmdOpts.lsp = 0x01; // FDCHEST-282 Fix
cmdOpts.offset = offset;

rtnVal = nvme_Get_Log_Page(&deviceList[deviceIter], &cmdOpts);
Expand Down Expand Up @@ -1373,6 +1374,7 @@ int32_t main(int argc, char *argv[])
cmdOpts.addr = logBuffer;
cmdOpts.dataLen = size;
cmdOpts.lid = GET_TELEMETRY_IDENTIFIER;
cmdOpts.lsp = 0x01; // FDCHEST-282 Fix
cmdOpts.offset = offset;

rtnVal = nvme_Get_Log_Page(&deviceList[deviceIter], &cmdOpts);
Expand Down Expand Up @@ -1484,11 +1486,18 @@ int32_t main(int argc, char *argv[])
{
case SUCCESS:
//nothing to print here since if it was successful, the log will be printed to the screen
break;
case NOT_SUPPORTED:
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("Printing Temperature Statistics data is not supported on this drive type.\n");
}
exitCode = UTIL_EXIT_OPERATION_NOT_SUPPORTED;
break;
default:
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("A failure occured while trying to get Error Information Log\n");
printf("A failure occured while trying to get Temp Statistics Information Log\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
break;
Expand All @@ -1501,11 +1510,18 @@ int32_t main(int argc, char *argv[])
{
case SUCCESS:
//nothing to print here since if it was successful, the log will be printed to the screen
break;
case NOT_SUPPORTED:
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("Printing PCI Statistics data is not supported on this drive type.\n");
}
exitCode = UTIL_EXIT_OPERATION_NOT_SUPPORTED;
break;
default:
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("A failure occured while trying to get Error Information Log\n");
printf("A failure occured while trying to get PCI Statistics Information Log\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
break;
Expand Down

0 comments on commit eb2f1c7

Please sign in to comment.