diff options
| author | itojun <itojun@NetBSD.org> | 2001-07-22 16:05:17 +0000 |
|---|---|---|
| committer | itojun <itojun@NetBSD.org> | 2001-07-22 16:05:17 +0000 |
| commit | 71aa31a75a91ed90cc5b1f6b8e978d2fbe53f764 (patch) | |
| tree | 1f934334a764e6a537f26321683d1b352dd365d4 /usr.sbin/apm | |
| parent | c95a92f84f813b33548d9b79f131986b9a416473 (diff) | |
support multiple batteries (currently only # of batteris is visible -
need to tweak ioctl API more). PR 10545.
Diffstat (limited to 'usr.sbin/apm')
| -rw-r--r-- | usr.sbin/apm/apm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c index 76bad2896f0..6b5fef87967 100644 --- a/usr.sbin/apm/apm.c +++ b/usr.sbin/apm/apm.c @@ -1,4 +1,4 @@ -/* $NetBSD: apm.c,v 1.9 2001/02/19 23:22:41 cgd Exp $ */ +/* $NetBSD: apm.c,v 1.10 2001/07/22 16:05:18 itojun Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -296,6 +296,10 @@ main(int argc, char *argv[]) printf("A/C adapter state: %s\n", ac_state(reply.batterystate.ac_state)); if (dostatus) printf("Power management enabled\n"); + if (reply.batterystate.nbattery) { + printf("Number of batteries: %u\n", + reply.batterystate.nbattery); + } } else { if (dobstate) printf("%d\n", reply.batterystate.battery_state); |
