diff --git a/include/openseachest_util_options.h b/include/openseachest_util_options.h index e4d320c..347c91c 100644 --- a/include/openseachest_util_options.h +++ b/include/openseachest_util_options.h @@ -2513,6 +2513,16 @@ extern "C" void print_Sanitize_Anti_Freeze_Help(bool shortHelp); + void print_Sanitize_Overwrite_Passes_Help(bool shortHelp); + + void print_Sanitize_Overwrite_Invert_Help(bool shortHelp); + + void print_Sanitize_AUSE_Help(bool shortHelp); + + void print_Zone_No_Reset_Help(bool shortHelp); + + void print_Sanitize_No_Deallocate_Help(bool shortHelp); + //----------------------------------------------------------------------------- // // print_Writesame_Help() diff --git a/src/openseachest_util_options.c b/src/openseachest_util_options.c index 143f86c..6a095e8 100644 --- a/src/openseachest_util_options.c +++ b/src/openseachest_util_options.c @@ -608,6 +608,86 @@ void print_Sanitize_Help(bool shortHelp, const char *utilName) } } +void print_Sanitize_Overwrite_Passes_Help(bool shortHelp) +{ + printf("\t--%s [ number of overwrite passes ]\n", SANITIZE_OVERWRITE_PASSES_LONG_OPT_STRING); + if (!shortHelp) + { + printf("\t\tSpecify the number of overwrite passes to use during a sanitize\n"); + printf("\t\toverwrite operation. By default, only a single overwrite pass\n"); + printf("\t\tis used unless this option specifies a different value.\n"); + printf("\t\tThe maximum number of passes varies by drive type:\n"); + printf("\t\tATA: 16 passes\n"); + printf("\t\tNVMe: 16 passes\n"); + printf("\t\tSCSI: 31 passes\n"); + printf("\t\tUse the --%s option to instruct the device to invert\n", SANITIZE_IPBP_LONG_OPT_STRING); + printf("\t\tthe pattern between each overwrite pass.\n"); + printf("\n"); + } +} + +void print_Sanitize_Overwrite_Invert_Help(bool shortHelp) +{ + printf("\t--%s\n", SANITIZE_IPBP_LONG_OPT_STRING); + if (!shortHelp) + { + printf("\t\tUse this option to instruct the drive to invert the requested\n"); + printf("\t\tsanitize overwrite pattern between each overwrite pass.\n"); + printf("\t\tFor the default pattern of all zeroes, this means that after\n"); + printf("\t\ta first pass of zeroes, the second pass will be all 1's (binary)\n"); + printf("\t\tor all F's (hexadecimal)\n\n"); + } +} + +void print_Sanitize_AUSE_Help(bool shortHelp) +{ + printf("\t--%s\n", SANITIZE_AUSE_LONG_OPT_STRING); + if (!shortHelp) + { + printf("\t\tUse this option to allow running a sanitize operation in\n"); + printf("\t\tunrestricted mode. Without this option, all sanitize options\n"); + printf("\t\tare run in restricted mode by default.\n"); + printf("\t\tIn unrestricted mode, if a sanitize erase fails the drive enters\n"); + printf("\t\ta failure state. The failure state can be cleared with a Sanitize\n"); + printf("\t\texit failure mode command, or it can be cleared with a successful\n"); + printf("\t\tsanitize erase.\n"); + printf("\t\tIn restricted mode, if a sanitize fails, the failure state can only\n"); + printf("\t\tbe cleared with a successful sanitize erase.\n\n"); + } +} + +void print_Zone_No_Reset_Help(bool shortHelp) +{ + printf("\t--%s\n", ZONE_NO_RESET_LONG_OPT_STRING); + if (!shortHelp) + { + printf("\t\tFor ZBD's (Zoned Block Devices), use this option during a\n"); + printf("\t\tSanitize or ATA Security Erase to specify leaving all zones\n"); + printf("\t\tfull so that full verification of erasure can be performed.\n"); + printf("\t\tWhen this option is not specified, all zones will be empty\n"); + printf("\t\tupon completion of these erases.\n\n"); + } +} + +void print_Sanitize_No_Deallocate_Help(bool shortHelp) +{ + printf("\t--%s\t(NVMe Only)\n", NO_DEALLOCATE_AFTER_ERASE_LONG_OPT_STRING); + if (!shortHelp) + { + printf("\t\tFor NVMe devices, specify this option during a sanitize to\n"); + printf("\t\tleave all blocks allocated after a sanitize erase. By default\n"); + printf("\t\tan NVMe controller will deallocate (TRIM/Unmap) all the LBAs.\n"); + printf("\t\tUsing this option allows for full verification of erasure after\n"); + printf("\t\ta Sanitize command.\n"); + printf("\t\tNOTE: An NVMe controller may inhibit this option in certain\n"); + printf("\t\tconfigurations meaning the sanitize may produce a warning or\n"); + printf("\t\ta failure depending on how this is configured on the controller.\n"); + printf("\t\tAfter verifying an erasure with this option, run a deallocate/TRIM\n"); + printf("\t\tacross the entire device/namespace to match default behavior of\n"); + printf("\t\ta sanitize erase.\n\n"); + } +} + void print_Poll_Help(bool shortHelp) { printf("\t--%s\n", POLL_LONG_OPT_STRING); diff --git a/subprojects/opensea-common b/subprojects/opensea-common index efa4233..0d8dcf5 160000 --- a/subprojects/opensea-common +++ b/subprojects/opensea-common @@ -1 +1 @@ -Subproject commit efa4233683840911d978124392d6607a8d6b2a9f +Subproject commit 0d8dcf5874564f994d4da957010b9b56a35d46e9 diff --git a/utils/C/openSeaChest/openSeaChest_Erase.c b/utils/C/openSeaChest/openSeaChest_Erase.c index 57c07c8..a58d017 100644 --- a/utils/C/openSeaChest/openSeaChest_Erase.c +++ b/utils/C/openSeaChest/openSeaChest_Erase.c @@ -3217,8 +3217,11 @@ void utility_Usage(bool shortUsage) printf("SATA - IO, and NVMexpress.\n"); printf("=========================\n"); //multiple interfaces + print_Sanitize_AUSE_Help(shortUsage); + print_Sanitize_Overwrite_Invert_Help(shortUsage); print_Overwrite_Help(shortUsage); print_Overwrite_Range_Help(shortUsage); + print_Sanitize_Overwrite_Passes_Help(shortUsage); print_Pattern_Help(shortUsage); print_Perform_Quickest_Erase_Help(shortUsage); #if !defined(DISABLE_TCG_SUPPORT) @@ -3230,6 +3233,7 @@ void utility_Usage(bool shortUsage) print_Trim_Unmap_Range_Help(shortUsage); print_Writesame_Help(shortUsage); print_Writesame_Range_Help(shortUsage); + print_Zone_No_Reset_Help(shortUsage); //SATA Only Options printf("\n\tSATA Only:\n\t=========\n"); print_ATA_Security_Erase_Help(shortUsage, "SeaChest"); @@ -3240,6 +3244,7 @@ void utility_Usage(bool shortUsage) print_Fast_Format_Help(shortUsage); print_Format_Unit_Help(shortUsage); printf("\n\tNVMe Only:\n\t=========\n"); + print_Sanitize_No_Deallocate_Help(shortUsage); print_NVM_Format_Metadata_Setting_Help(shortUsage); print_NVM_Format_Metadata_Size_Help(shortUsage); print_NVM_Format_NSID_Help(shortUsage);