Accept "maximum" and "minimum" modes as well as their abbreviations.

MFC after:	2 weeks
This commit is contained in:
Dag-Erling Smørgrav 2005-09-26 12:16:27 +00:00
parent 454c3d13be
commit db20dc4dbb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150564
2 changed files with 3 additions and 3 deletions

View File

@ -45,7 +45,7 @@ The
.Nm
utility monitors the system state and sets various power control options
accordingly.
It offers three modes (max, min, and adaptive) that can be
It offers three modes (maximum, minimum, and adaptive) that can be
individually selected while on AC power or batteries.
.Pp
Maximum mode chooses the highest performance values.

View File

@ -228,9 +228,9 @@ static void
parse_mode(char *arg, int *mode, int ch)
{
if (strcmp(arg, "min") == 0)
if (strcmp(arg, "minimum") == 0 || strcmp(arg, "min") == 0)
*mode = MODE_MIN;
else if (strcmp(arg, "max") == 0)
else if (strcmp(arg, "maximum") == 0 || strcmp(arg, "max") == 0)
*mode = MODE_MAX;
else if (strcmp(arg, "adaptive") == 0)
*mode = MODE_ADAPTIVE;