diff options
author | 2005-12-02 04:27:52 +0000 | |
---|---|---|
committer | 2005-12-02 04:27:52 +0000 | |
commit | ab844ba285a6385e5249b36a710e6ee57d245a2c (patch) | |
tree | b8d4438871f88de6273481b6a793e613881ef24d /usr.sbin/apmd/apmsubr.c | |
parent | Missing 'break;'. Spotted by lint. (diff) | |
download | wireguard-openbsd-ab844ba285a6385e5249b36a710e6ee57d245a2c.tar.xz wireguard-openbsd-ab844ba285a6385e5249b36a710e6ee57d245a2c.zip |
Modify automatic performance adjustment mode so that the cpu is set
to go fast if the power is connected and the battery is more than 15%
charged, and when on batteries keeps setperf low unless needed.
add a cool runnings mode option (-C) that does the previous behaviour
of keeping the CPU as low as possible unless needed.
ok deradt@, sturm@, "i like it's" djm@ henning@ and others.
Diffstat (limited to 'usr.sbin/apmd/apmsubr.c')
-rw-r--r-- | usr.sbin/apmd/apmsubr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/apmd/apmsubr.c b/usr.sbin/apmd/apmsubr.c index 7cc8305c8cc..1686ea6a9a1 100644 --- a/usr.sbin/apmd/apmsubr.c +++ b/usr.sbin/apmd/apmsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: apmsubr.c,v 1.4 2005/11/23 08:02:58 sturm Exp $ */ +/* $OpenBSD: apmsubr.c,v 1.5 2005/12/02 04:27:52 beck Exp $ */ /* * Copyright (c) 1995,1996 John T. Kohl @@ -81,6 +81,8 @@ perf_state(int state) return "manual"; case PERF_AUTO: return "auto"; + case PERF_COOL: + return "cool running"; default: return "invalid performance status"; } |