summaryrefslogtreecommitdiffstats
path: root/usr.sbin/apm
diff options
context:
space:
mode:
authorcharnier <charnier@FreeBSD.org>2002-10-15 16:28:21 +0000
committercharnier <charnier@FreeBSD.org>2002-10-15 16:28:21 +0000
commit183ae684c4585ba0da8369291d941dc374d349a2 (patch)
tree8eed37a5e7ac03cc427815a09cd2deea6970e129 /usr.sbin/apm
parent3e13a3250af068de42ff4ef8176a904aa98420a6 (diff)
downloadFreeBSD-src-183ae684c4585ba0da8369291d941dc374d349a2.zip
FreeBSD-src-183ae684c4585ba0da8369291d941dc374d349a2.tar.gz
Add missing .Nm. Add FBSDID. fprintf -> warnx. Lowercase first letter inside
err().
Diffstat (limited to 'usr.sbin/apm')
-rw-r--r--usr.sbin/apm/apm.84
-rw-r--r--usr.sbin/apm/apm.c13
2 files changed, 8 insertions, 9 deletions
diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8
index e9263bf..38556d5 100644
--- a/usr.sbin/apm/apm.8
+++ b/usr.sbin/apm/apm.8
@@ -111,7 +111,9 @@ it is unknown, -1 is displayed.
Transition the system into standby mode. This mode uses less power than
full power mode, but more than suspend mode. Some laptops support
resuming from this state on timer or Ring Indicator events. The
-output of apm tells what your laptop claims to support.
+output of
+.Nm
+tells what your laptop claims to support.
.It Fl z
Suspend the system.
It is equivalent to
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c
index 0a805c9..b439d7e 100644
--- a/usr.sbin/apm/apm.c
+++ b/usr.sbin/apm/apm.c
@@ -13,10 +13,8 @@
* Sep., 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD)
*/
-#ifndef lint
-static const char rcsid[] =
- "$FreeBSD$";
-#endif /* not lint */
+#include <sys/cdefs.h>
+__FBSDID("$FreeBSD$");
#include <sys/file.h>
#include <sys/ioctl.h>
@@ -269,9 +267,8 @@ print_all_info(int fd, apm_info_t aip, int bioscall_available)
if (apmerr == 0x0d || apmerr == 0x86)
printf("Resume timer: disabled\n");
else if (apmerr)
- fprintf(stderr,
- "Failed to get the resume timer: APM error0x%x\n",
- apmerr);
+ warnx(
+ "failed to get the resume timer: APM error0x%x", apmerr);
else {
/*
* OK. We have the time (all bcd).
@@ -386,7 +383,7 @@ apm_set_timer(int fd, int delta)
args.ecx = 0x0000;
}
if (ioctl(fd, APMIO_BIOS, &args)) {
- err(1,"Set resume timer");
+ err(1,"set resume timer");
}
}
OpenPOWER on IntegriCloud