diff options
author | Marco S Hyman <marc@cvs.openbsd.org> | 1998-07-21 04:06:31 +0000 |
---|---|---|
committer | Marco S Hyman <marc@cvs.openbsd.org> | 1998-07-21 04:06:31 +0000 |
commit | 323587a78ef291e4cf768f1328e7b3df160537ad (patch) | |
tree | 0649eb2254e5d0d162163883090f21a16402236c /usr.sbin/apmd | |
parent | 04eb3f8da6ef70c1da335e57fb9f88c8b72ce0f9 (diff) |
update usage; back out time remaining display change until I'm sure it
is correct; don't long every power status change in normal operation (patch
from danw@MIT.EDU).
Diffstat (limited to 'usr.sbin/apmd')
-rw-r--r-- | usr.sbin/apmd/apmd.8 | 10 | ||||
-rw-r--r-- | usr.sbin/apmd/apmd.c | 8 |
2 files changed, 10 insertions, 8 deletions
diff --git a/usr.sbin/apmd/apmd.8 b/usr.sbin/apmd/apmd.8 index 72b89e4f7cd..2cf423ec3a9 100644 --- a/usr.sbin/apmd/apmd.8 +++ b/usr.sbin/apmd/apmd.8 @@ -24,7 +24,7 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $Id: apmd.8,v 1.4 1998/07/18 02:42:27 marc Exp $ +.\" $Id: apmd.8,v 1.5 1998/07/21 04:06:29 marc Exp $ .\" .Dd March 24, 1996 .Dt APMD 8 @@ -183,17 +183,17 @@ The .Fl f flag may be used to specify an alternate device file name. .Sh SEE ALSO -.Xr apm 4 , -.Xr apm 8 , .Xr execve 2 , -.Xr speaker 4 , .Xr syslog 3 , +.Xr apm 4 , +.Xr speaker 4 , +.Xr apm 8 , .Xr syslogd 8 . .Sh REFERENCES Advanced Power Management (APM) BIOS Interface Specification (revision 1.1), Intel Corporation and Microsoft Corporation. .Sh HISTORY The -.Nm apmd +.Nm command appeared in .Ox 1.2 . diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c index 2751b126151..e2215836d4e 100644 --- a/usr.sbin/apmd/apmd.c +++ b/usr.sbin/apmd/apmd.c @@ -83,7 +83,9 @@ sigexit(int signo) void usage(void) { - fprintf(stderr,"usage: %s [-d] [-t timo] [-s] [-a] [-f devfile] [-S sockfile]\n", __progname); + fprintf(stderr, + "usage: %s [-dsaqepm] [-t timo] [-a] [-f devfile] [-S sockfile]\n", + __progname); exit(1); } @@ -121,7 +123,7 @@ power_status(int fd, int force, struct apm_power_info *pinfo) "estimated battery life %d%% (%d minutes)", battstate(bstate.battery_state), ac_state(bstate.ac_state), bstate.battery_life, - bstate.minutes_left / 60 ); + bstate.minutes_left ); else syslog(LOG_NOTICE, "battery status: %s. external power status: %s. " @@ -424,7 +426,7 @@ main(int argc, char *argv[]) resumes++; break; case APM_POWER_CHANGE: - power_status(ctl_fd, 1, 0); + power_status(ctl_fd, 0, 0); break; default: break; |