summaryrefslogtreecommitdiffstats
path: root/usr.sbin/apm
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2009-12-22 14:21:08 +0000
committerru <ru@FreeBSD.org>2009-12-22 14:21:08 +0000
commit2c27b3cca9f677862d6dbcb87b5d153887db5c09 (patch)
tree333baad8f5b9abc10e247edaf092245826c8c88a /usr.sbin/apm
parentb1be6dab1b6ffe015d7aeb8a6d08021ebdf00fcf (diff)
downloadFreeBSD-src-2c27b3cca9f677862d6dbcb87b5d153887db5c09.zip
FreeBSD-src-2c27b3cca9f677862d6dbcb87b5d153887db5c09.tar.gz
apm(8) is no longer linked to zzz(8), catch up.
(Fixes "zzz" clash in the whatis(1) database.)
Diffstat (limited to 'usr.sbin/apm')
-rw-r--r--usr.sbin/apm/apm.834
-rw-r--r--usr.sbin/apm/apm.c13
2 files changed, 17 insertions, 30 deletions
diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8
index 1e36f63..3e039b0 100644
--- a/usr.sbin/apm/apm.8
+++ b/usr.sbin/apm/apm.8
@@ -7,15 +7,15 @@
.\" these terms are retained. Under no circumstances is the author
.\" responsible for the proper functioning of this software, nor does
.\" the author assume any responsibility for damages incurred with its
+.\" use.
.\"
.\" $FreeBSD$
.\"
-.\" use.
-.Dd November 1, 1994
+.Dd December 22, 2009
.Dt APM 8 i386
.Os
.Sh NAME
-.Nm apm , zzz
+.Nm apm
.Nd control the APM BIOS and display its information
.Sh SYNOPSIS
.Nm
@@ -24,27 +24,14 @@
.Op Fl e Ar enable
.Op Fl h Ar enable
.Op Fl r Ar delta
-.Pp
-.Nm zzz
.Sh DESCRIPTION
The
.Nm
utility
controls the Intel / Microsoft APM (Advanced Power Management) BIOS and
displays the current status of APM on laptop PCs.
-The
-.Nm zzz
-utility suspends the system by controlling APM.
.Pp
-The following options are available for
-.Nm
-(no options are available for
-.Nm zzz ) .
-If no options are specified,
-.Nm
-displays information and current status of APM in verbose mode.
-If multiple display options are given, the values are displayed one
-per line in the order given here.
+The options are as follows:
.Bl -tag -width indent
.It Fl a
Display the current AC-line status as an integer value.
@@ -126,9 +113,15 @@ output of
tells what your laptop claims to support.
.It Fl z
Suspend the system.
-It is equivalent to
-.Nm zzz .
+It is used by
+.Xr zzz 8 .
.El
+.Pp
+If no options are specified,
+.Nm
+displays information and current status of APM in verbose mode.
+If multiple display options are given, the values are displayed one
+per line in the order given here.
.Sh NOTES
.Xr apmconf 8
has been merged in
@@ -137,7 +130,8 @@ and thus
.Nm
replaces all of its functionality.
.Sh SEE ALSO
-.Xr apm 4
+.Xr apm 4 ,
+.Xr zzz 8
.Sh AUTHORS
.An Tatsumi Hosokawa Aq hosokawa@jp.FreeBSD.org
.Sh BUGS
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c
index 56432a4..a60f821 100644
--- a/usr.sbin/apm/apm.c
+++ b/usr.sbin/apm/apm.c
@@ -1,5 +1,5 @@
/*
- * apm / zzz APM BIOS utility for FreeBSD
+ * APM BIOS utility for FreeBSD
*
* Copyright (C) 1994-1996 by Tatsumi Hosokawa <hosokawa@jp.FreeBSD.org>
*
@@ -43,10 +43,9 @@ int cmos_wall = 0; /* True when wall time is in cmos clock, else UTC */
static void
usage(void)
{
- fprintf(stderr, "%s\n%s\n",
+ fprintf(stderr,
"usage: apm [-ablstzZ] [-d enable ] [ -e enable ] "
- "[ -h enable ] [-r delta]",
- " zzz");
+ "[ -h enable ] [-r delta]\n");
exit(1);
}
@@ -397,11 +396,6 @@ main(int argc, char *argv[])
else
cmdname = argv[0];
- if (strcmp(cmdname, "zzz") == 0) {
- dosleep = 1;
- all_info = 0;
- goto finish_option;
- }
while ((c = getopt(argc, argv, "abe:h:lRr:stzd:Z")) != -1) {
switch (c) {
case 'a':
@@ -457,7 +451,6 @@ main(int argc, char *argv[])
argc -= optind;
argv += optind;
}
-finish_option:
if (haltcpu != -1 || enable != -1 || display != -1 || delta || dosleep
|| standby) {
fd = open(APMDEV, O_RDWR);
OpenPOWER on IntegriCloud