From 71aa31a75a91ed90cc5b1f6b8e978d2fbe53f764 Mon Sep 17 00:00:00 2001 From: itojun Date: Sun, 22 Jul 2001 16:05:17 +0000 Subject: support multiple batteries (currently only # of batteris is visible - need to tweak ioctl API more). PR 10545. --- usr.sbin/apm/apm.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'usr.sbin/apm') 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); -- cgit