aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/apm
diff options
context:
space:
mode:
authorWill Andrews <will@FreeBSD.org>2005-05-30 18:44:43 +0000
committerWill Andrews <will@FreeBSD.org>2005-05-30 18:44:43 +0000
commitb3d2f94ea7028a8edb1b3d93d6161f8c6258f3b8 (patch)
treeb495c40e8bfbe6cc3b3d2e2497a9628ad3a8c921 /usr.sbin/apm
parent5a8d0950c18b46540cb11c837410d7e91eb822f7 (diff)
downloadsrc-b3d2f94ea7028a8edb1b3d93d6161f8c6258f3b8.tar.gz
src-b3d2f94ea7028a8edb1b3d93d6161f8c6258f3b8.zip
Notes
Diffstat (limited to 'usr.sbin/apm')
-rw-r--r--usr.sbin/apm/apm.86
-rw-r--r--usr.sbin/apm/apm.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/apm/apm.8 b/usr.sbin/apm/apm.8
index 8142668da021..1e36f639f509 100644
--- a/usr.sbin/apm/apm.8
+++ b/usr.sbin/apm/apm.8
@@ -49,10 +49,12 @@ per line in the order given here.
.It Fl a
Display the current AC-line status as an integer value.
The values
-0 and 1 correspond to the
+0, 1 and 2 correspond to the
.Dq off-line
-state or
+state,
.Dq on-line
+state or
+.Dq backup power
state, respectively.
.It Fl b
Display an integer value reflecting the current battery status.
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c
index 2b92545ae12f..56432a4ab7a2 100644
--- a/usr.sbin/apm/apm.c
+++ b/usr.sbin/apm/apm.c
@@ -195,14 +195,14 @@ print_all_info(int fd, apm_info_t aip, int bioscall_available)
{
struct apm_bios_arg args;
int apmerr;
- const char *line_msg[] = { "off-line", "on-line" };
+ const char *line_msg[] = { "off-line", "on-line" , "backup power"};
printf("APM version: %d.%d\n", aip->ai_major, aip->ai_minor);
printf("APM Management: %s\n", aip->ai_status ? "Enabled" : "Disabled");
printf("AC Line status: ");
if (aip->ai_acline == APM_UNKNOWN)
printf("unknown\n");
- else if (aip->ai_acline > 1)
+ else if (aip->ai_acline > 2)
printf("invalid value (0x%x)\n", aip->ai_acline);
else
printf("%s\n", line_msg[aip->ai_acline]);