summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-07-05 20:10:33 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-07-05 20:10:33 +0000
commitb92b6834a0a708869ed0ec32c6329594409da01a (patch)
tree71566c2ff5cfe0cb5458010df67215439d0196ed
parent9e91869c78e3cd04f6e5b0be911acdce516a3424 (diff)
remove -d, fix manual, document -s option; mostly from Kevin Steves <stevesk@pobox.com>
-rw-r--r--usr.sbin/apm/apm.848
-rw-r--r--usr.sbin/apm/apm.c8
2 files changed, 23 insertions, 33 deletions
diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8
index 6a6ccbb547d..b4e98856183 100644
--- a/usr.sbin/apm/apm.8
+++ b/usr.sbin/apm/apm.8
@@ -1,3 +1,5 @@
+.\" $OpenBSD: apm.8,v 1.16 2001/07/05 20:10:31 mickey Exp $
+.\"
.\" Copyright (c) 1996 John T. Kohl
.\" All rights reserved.
.\"
@@ -24,8 +26,6 @@
.\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $Id: apm.8,v 1.15 2001/07/04 07:10:51 mickey Exp $
-.\"
.Dd March 18, 1996
.Dt APM 8
.Os
@@ -34,19 +34,11 @@
.Nd Advanced Power Management control program
.Sh SYNOPSIS
.Nm zzz
-.Op Fl S
-.Op Fl z
+.Op Fl Sz
.Op Fl f Ar sockname
.Br
.Nm apm
-.Op Fl z
-.Op Fl S
-.Op Fl s
-.Op Fl l
-.Op Fl m
-.Op Fl b
-.Op Fl a
-.Op Fl v
+.Op Fl ablmsSvz
.Op Fl f Ar sockname
.Sh DESCRIPTION
.Nm
@@ -60,29 +52,31 @@ displays the current power management state in verbose form.
.Pp
The options are as follows:
.Bl -tag -width Ds
-.It Fl z
-Put the system into suspend (deep sleep) mode.
-.It Fl S
-Put the system into stand-by (light sleep) mode.
-.It Fl l
-Display the estimated battery lifetime (in percent).
-.It Fl m
-Display the estimated battery lifetime (in minutes).
-.It Fl b
-Display the battery status.
-0 means high, 1 means low, 2 means
-critical, 3 means charging, 4 means absent, and 255 means unknown.
.It Fl a
Display the external charger (A/C status).
0 means disconnected, 1
means connected, 2 means backup power source, and 255 means unknown.
-.It Fl v
-Request more verbose description of the displayed states.
+.It Fl b
+Display the battery status.
+0 means high, 1 means low, 2 means
+critical, 3 means charging, 4 means absent, and 255 means unknown.
.It Fl f Ar sockname
Set the name of the socket via which to contact
.Xr apmd 8
to
.Pa sockname .
+.It Fl l
+Display the estimated battery lifetime (in percent).
+.It Fl m
+Display the estimated battery lifetime (in minutes).
+.It Fl S
+Put the system into stand-by (light sleep) mode.
+.It Fl s
+Display if power management is enabled.
+.It Fl v
+Request more verbose description of the displayed states.
+.It Fl z
+Put the system into suspend (deep sleep) mode.
.El
.Pp
The
@@ -115,7 +109,7 @@ APM functions.
.Xr apmd 8
.Sh REFERENCES
Advanced Power Management (APM) BIOS Interface Specification (revision
-1.1), Intel Corporation and Microsoft Corporation
+1.2), Intel Corporation and Microsoft Corporation
.Sh HISTORY
The
.Nm
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c
index fbb731efa17..d1a94f0a279 100644
--- a/usr.sbin/apm/apm.c
+++ b/usr.sbin/apm/apm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apm.c,v 1.3 1998/10/29 18:21:44 mickey Exp $ */
+/* $OpenBSD: apm.c,v 1.4 2001/07/05 20:10:32 mickey Exp $ */
/*
* Copyright (c) 1996 John T. Kohl
@@ -50,10 +50,6 @@
extern char *__progname;
extern char *optarg;
-extern int optind;
-extern int optopt;
-extern int opterr;
-extern int optreset;
void usage(void);
void zzusage(void);
@@ -164,7 +160,7 @@ main(int argc, char *argv[])
struct apm_command command;
struct apm_reply reply;
- while ((ch = getopt(argc, argv, "lmbvadsSzf:")) != -1)
+ while ((ch = getopt(argc, argv, "lmbvasSzf:")) != -1)
switch(ch) {
case 'v':
verbose = TRUE;