commit 808065e6f91db1e9c2f05e1cbc6cd096c99347eb parent cd6fa442b3d2fa1146d227320dde2a50cdf6ce8c Author: sin <sin@2f30.org> Date: Sun, 2 Nov 2014 14:42:34 +0000 Warn on unknown AC state Diffstat:
M | xbattmon.c | | | 3 | +++ |
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/xbattmon.c b/xbattmon.c @@ -147,6 +147,9 @@ pollbat(void) if (howmuch > maxcap) howmuch = maxcap; + if (info.ac_state == APM_AC_UNKNOWN) + warnx("unknown AC state"); + state = info.ac_state == APM_AC_ON ? AC_ON : AC_OFF; } #elif __linux__