Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion subprojects/opensea-common
2 changes: 1 addition & 1 deletion subprojects/opensea-operations
2 changes: 1 addition & 1 deletion subprojects/opensea-transport
31 changes: 27 additions & 4 deletions utils/C/openSeaChest/openSeaChest_Basics.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "EULA.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "dst.h"
#include "firmware_download.h"
#include "getopt.h"
Expand Down Expand Up @@ -1242,13 +1243,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
printf("ERROR: failed to get device information\n");
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down
31 changes: 27 additions & 4 deletions utils/C/openSeaChest/openSeaChest_Configure.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "ata_device_config_overlay.h"
#include "device_statistics.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "getopt.h"
#include "logs.h"
#include "openseachest_util_options.h"
Expand Down Expand Up @@ -2052,13 +2053,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
printf("ERROR: failed to get device information\n");
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down
31 changes: 27 additions & 4 deletions utils/C/openSeaChest/openSeaChest_Defect.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "EULA.h"
#include "defect.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "dst.h"
#include "getopt.h"
#include "openseachest_util_options.h"
Expand Down Expand Up @@ -1074,13 +1075,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
printf("ERROR: failed to get device information\n");
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down
43 changes: 33 additions & 10 deletions utils/C/openSeaChest/openSeaChest_Erase.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#endif
#include "ata_Security.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "format.h"
#include "generic_tests.h"
#include "host_erase.h"
Expand Down Expand Up @@ -1469,7 +1470,7 @@ int main(int argc, char* argv[])
#if defined(UEFI_C_SOURCE)
deviceList[handleIter].os_info.fd = M_NULLPTR;
#elif !defined(_WIN32)
deviceList[handleIter].os_info.fd = -1;
deviceList[handleIter].os_info.fd = -1;
# if defined(VMK_CROSS_COMP)
deviceList[handleIter].os_info.nvmeFd = M_NULLPTR;
# endif
Expand Down Expand Up @@ -1735,13 +1736,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
printf("ERROR: failed to get device information\n");
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down Expand Up @@ -2174,9 +2197,9 @@ int main(int argc, char* argv[])
}
if (DATA_ERASE_FLAG)
{
writeAfterErase writeReq;
eRevertAuthority authority = REVERT_AUTHORITY_MSID;
char* passwordToUse = M_NULLPTR;
writeAfterErase writeReq;
eRevertAuthority authority = REVERT_AUTHORITY_MSID;
char* passwordToUse = M_NULLPTR;
safe_memset(&writeReq, sizeof(writeAfterErase), 0, sizeof(writeAfterErase));
if (safe_strlen(TCG_PSID_FLAG) || safe_strlen(TCG_SID_FLAG))
{
Expand All @@ -2191,12 +2214,12 @@ int main(int argc, char* argv[])
}
else if (safe_strlen(TCG_PSID_FLAG) == 32)
{
authority = REVERT_AUTHORITY_PSID;
authority = REVERT_AUTHORITY_PSID;
passwordToUse = TCG_PSID_FLAG;
}
else if (safe_strlen(TCG_SID_FLAG) > 0)
{
authority = REVERT_AUTHORITY_SID;
authority = REVERT_AUTHORITY_SID;
passwordToUse = TCG_SID_FLAG;
}
else
Expand Down
31 changes: 27 additions & 4 deletions utils/C/openSeaChest/openSeaChest_Firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#endif
#include "EULA.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "firmware_download.h"
#include "getopt.h"
#include "openseachest_util_options.h"
Expand Down Expand Up @@ -1010,13 +1011,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
printf("ERROR: failed to get device information\n");
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down
31 changes: 27 additions & 4 deletions utils/C/openSeaChest/openSeaChest_Format.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "EULA.h"
#include "depopulate.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "format.h"
#include "getopt.h"
#include "openseachest_util_options.h"
Expand Down Expand Up @@ -1289,13 +1290,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
printf("ERROR: failed to get device information\n");
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down
31 changes: 27 additions & 4 deletions utils/C/openSeaChest/openSeaChest_GenericTests.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "EULA.h"
#include "buffer_test.h"
#include "drive_info.h"
#include "drive_information_json.h"
#include "generic_tests.h"
#include "getopt.h"
#include "openseachest_util_options.h"
Expand Down Expand Up @@ -1146,13 +1147,35 @@ int main(int argc, char* argv[])
// now start looking at what operations are going to be performed and kick them off
if (DEVICE_INFO_FLAG)
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
if (JSON_OUTPUT_FLAG)
{
if (VERBOSITY_QUIET < toolVerbosity)
char* jsonFormatOutput = M_NULLPTR;
if (SUCCESS != create_JSON_Output_For_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG,
util_name, buildVersion, &jsonFormatOutput))
{
printf("ERROR: failed to get device information\n");
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
else
{
// write the data on console
printf("%s\n\n", jsonFormatOutput);
}
safe_free(&jsonFormatOutput);
}
else
{
if (SUCCESS != print_Drive_Information(&deviceList[deviceIter], SAT_INFO_FLAG))
{
if (VERBOSITY_QUIET < toolVerbosity)
{
printf("ERROR: failed to get device information\n");
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
exitCode = UTIL_EXIT_OPERATION_FAILURE;
}
}

Expand Down
Loading
Loading