aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/powerd
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2008-06-22 17:52:57 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2008-06-22 17:52:57 +0000
commitdc70a966e31f95eda5bd51f0773bb2a7e7bf0d7c (patch)
tree480dca3bfe2072b9ed98e4126396c4c287d205e8 /usr.sbin/powerd
parentf27ca6ea2f076ba100c97e139e58caaf74103dab (diff)
downloadsrc-dc70a966e31f95eda5bd51f0773bb2a7e7bf0d7c.tar.gz
src-dc70a966e31f95eda5bd51f0773bb2a7e7bf0d7c.zip
Add an abbreviation for adaptive mode, and document all the abreviations.
Notes
Notes: svn path=/head/; revision=179932
Diffstat (limited to 'usr.sbin/powerd')
-rw-r--r--usr.sbin/powerd/powerd.81
-rw-r--r--usr.sbin/powerd/powerd.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/powerd/powerd.8 b/usr.sbin/powerd/powerd.8
index af5f299dc41d..8ca5e0c7aedd 100644
--- a/usr.sbin/powerd/powerd.8
+++ b/usr.sbin/powerd/powerd.8
@@ -47,6 +47,7 @@ utility monitors the system state and sets various power control options
accordingly.
It offers three modes (maximum, minimum, and adaptive) that can be
individually selected while on AC power or batteries.
+The modes maximum, minimum, and adaptive may be abbreviated max, min, adp.
.Pp
Maximum mode chooses the highest performance values.
Minimum mode selects the lowest performance values to get the most power
diff --git a/usr.sbin/powerd/powerd.c b/usr.sbin/powerd/powerd.c
index 9e6ed2894c02..8ecff2353552 100644
--- a/usr.sbin/powerd/powerd.c
+++ b/usr.sbin/powerd/powerd.c
@@ -339,7 +339,7 @@ parse_mode(char *arg, int *mode, int ch)
*mode = MODE_MIN;
else if (strcmp(arg, "maximum") == 0 || strcmp(arg, "max") == 0)
*mode = MODE_MAX;
- else if (strcmp(arg, "adaptive") == 0)
+ else if (strcmp(arg, "adaptive") == 0 || strcmp(arg, "adp") == 0)
*mode = MODE_ADAPTIVE;
else
errx(1, "bad option: -%c %s", (char)ch, optarg);