Skip to content

Commit

Permalink
merge: Merge tag 'v23.03.1' into develop
Browse files Browse the repository at this point in the history
rel: Finish v23.03.1

-Fixed hybrid SMART attribute counter output
-Added missing Seagate attribute name for attribute 198
-Fix for overwriting some drives in Windows. Previously a permissions issue was reported writing to LBA 0 when erasing a full drive.
-Added note about output of DST log entries (mostly for SATA since it reads based on pointer to latest result instead of first in buffer which can be confusing for those looking at a raw log view)
-Updated ATA verbose output with more information for some commands such as read log ext and write log ext
-Updated help output to show handle examples as /dev/sg<#> or PD<#> to prevent confusion of the ? which is a wildcard. Note: This wildcard is not supported in openSeaChest. Use -d all for a method of running on all devices instead
-Changed how legacy ATA standby timer is set. It will read the current state of the drive to decide between using the standby command or the idle command. Previously it only used standby which was causing drives to spin down immediately.

Signed-off-by: Tyler Erickson <tyler.j.erickson@seagate.com>

# Conflicts:
#	subprojects/opensea-operations
#	subprojects/opensea-transport
  • Loading branch information
Tyler Erickson committed Mar 27, 2023
2 parents 4342530 + 4509336 commit 249b467
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: C/C++ CI

on:
push:
branches: [ develop, master, release/*, feature/* ]
branches: [ develop, master, release/*, feature/*, hotfix/* ]
pull_request:
branches: [ develop ]

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/meson.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI for meson build

on:
push:
branches: [ develop, master, release/*, feature/* ]
branches: [ develop, master, release/*, feature/*, hotfix/* ]
tags: [ v* ]
pull_request:
branches: [ develop ]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
- develop
- release/*
- feature/*
- hotfix/*
pull_request:
branches:
- develop
Expand Down
35 changes: 20 additions & 15 deletions src/openseachest_util_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,28 @@

#if defined (__linux__)
#if defined (VMK_CROSS_COMP)
const char *deviceHandleExample = "vmhba1";
const char *deviceHandleExample = "vmhba<#>";
const char *deviceHandleName = "<deviceHandle>";
const char *commandWindowType = "terminal";
#else
const char *deviceHandleExample = "/dev/sg?";
const char *deviceHandleExample = "/dev/sg<#>";
const char *deviceHandleName = "<sg_device>";
const char *commandWindowType = "terminal";
#endif
#elif defined (__FreeBSD__)
const char *deviceHandleExample = "/dev/da?";
const char *deviceHandleExample = "/dev/da<#>";
const char *deviceHandleName = "<da_device>";
const char *commandWindowType = "shell";
#elif defined (_WIN32)
const char *deviceHandleExample = "PD?";
const char *deviceHandleExample = "PD<#>";
const char *deviceHandleName = "<physical_device>";
const char *commandWindowType = "command";
#elif defined (__sun)
const char *deviceHandleExample = "/dev/rdsk/c?t?d?";
const char *deviceHandleExample = "/dev/rdsk/c<#>t<#>d<#>";
const char *deviceHandleName = "<rdsk_device>";
const char *commandWindowType = "shell";
#elif defined (_AIX)
const char *deviceHandleExample = "/dev/rhdisk?";
const char *deviceHandleExample = "/dev/rhdisk<#>";
const char *deviceHandleName = "<rhdisk_device>";
const char *commandWindowType = "shell";
#else
Expand All @@ -47,9 +47,9 @@ const char *commandWindowType = "shell";
#if defined (ENABLE_CSMI)
//static const char *csmiDeviceHandleName = "<csmi_device>";
#if defined (_WIN32)
static const char *csmiDeviceHandleExample = "csmi\?:\?:?:?";
static const char *csmiDeviceHandleExample = "csmi<#>:<#>:<#>:<#>";
#else
static const char *csmiDeviceHandleExample = "<error\?\?\?>";
static const char *csmiDeviceHandleExample = "<error<#><#><#>>";
#endif //_WIN32
#endif //ENABLE_CSMI

Expand Down Expand Up @@ -348,14 +348,19 @@ void print_Device_Help(bool shortHelp, const char *helpdeviceHandleExample)
printf("\t\tUse this option with most commands to specify the device\n");
printf("\t\thandle on which to perform an operation. Example: %s\n", helpdeviceHandleExample);
#if defined(_WIN32)
printf("\t\tA handle can also be specified as \\\\.\\PhysicalDrive?\n");
printf("\t\tA handle can also be specified as \\\\.\\PhysicalDrive<#>\n");
#endif
#if defined (ENABLE_CSMI)
printf("\t\tCSMI device handles can be specified as %s\n", csmiDeviceHandleExample);
#endif
printf("\t\tTo run across all devices detected in the system, use the\n");
printf("\t\t\"all\" argument instead of a device handle.\n");
printf("\t\tExample: -%c all\n", DEVICE_SHORT_OPT);
printf("\t\tNOTE: The \"all\" argument is handled by running the\n");
printf("\t\t specified options on each drive detected in the\n");
printf("\t\t OS sequentially. For parallel operations, please\n");
printf("\t\t use a script opening a separate instance for each\n");
printf("\t\t device handle.\n");
printf("\n");
}
}
Expand Down Expand Up @@ -589,7 +594,7 @@ void print_Writesame_Help(bool shortHelp)

void print_Writesame_Range_Help(bool shortHelp)
{
printf("\t--%s [range]\n", WRITE_SAME_RANGE_LONG_OPT_STRING);
printf("\t--%s [range in # of LBAs]\n", WRITE_SAME_RANGE_LONG_OPT_STRING);
if (!shortHelp)
{
printf("\t\tSpecify a range to writesame to. Use this option with the\n");
Expand Down Expand Up @@ -1156,7 +1161,7 @@ void print_User_Generic_Start_Help(bool shortHelp)

void print_User_Generic_Range_Help(bool shortHelp)
{
printf("\t--%s [range]\n", USER_GENERIC_LONG_OPT_RANGE_STRING);
printf("\t--%s [range in # of LBAs]\n", USER_GENERIC_LONG_OPT_RANGE_STRING);
if (!shortHelp)
{
printf("\t\tUse this option to specify the range for a \n");
Expand Down Expand Up @@ -1284,10 +1289,10 @@ void print_Overwrite_Help(bool shortHelp)

void print_Overwrite_Range_Help(bool shortHelp)
{
printf("\t--%s [range]\n", OVERWRITE_RANGE_LONG_OPT_STRING);
printf("\t--%s [range in # of LBAs]\n", OVERWRITE_RANGE_LONG_OPT_STRING);
if (!shortHelp)
{
printf("\t\tUse with option with the overwrite option to\n");
printf("\t\tUse with the overwrite option (--%s) to\n", OVERWRITE_LONG_OPT_STRING);
printf("\t\terase a range of LBAs on the selected drive.\n\n");
}
}
Expand All @@ -1305,12 +1310,12 @@ void print_Trim_Unmap_Help(bool shortHelp)

void print_Trim_Unmap_Range_Help(bool shortHelp)
{
printf("\t--%s or --%s [range]\n", TRIM_RANGE_LONG_OPT_STRING, UNMAP_RANGE_LONG_OPT_STRING);
printf("\t--%s or --%s [range in # of LBAs]\n", TRIM_RANGE_LONG_OPT_STRING, UNMAP_RANGE_LONG_OPT_STRING);
if (!shortHelp)
{
printf("\t\tUse one of these options to specify a range to trim\n");
printf("\t\tor unmap on a drive. A starting point must be specified\n");
printf("\t\twith the --trim/--unmap option.\n\n");
printf("\t\twith the --%s/--%s option.\n\n", TRIM_LONG_OPT_STRING, UNMAP_RANGE_LONG_OPT_STRING);
}
}

Expand Down

0 comments on commit 249b467

Please sign in to comment.