Subject: pkg/14403: x11/gnome-applets:battery_applet cannot get the battery status
To: None <gnats-bugs@gnats.netbsd.org>
From: None <minoura@netbsd.org>
List: netbsd-bugs
Date: 10/31/2001 00:37:13
>Number: 14403
>Category: pkg
>Synopsis: x11/gnome-applets:battery_applet cannot get the battery status
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Oct 30 07:38:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Minoura Makoto
>Release: NetBSD-1.5Y, 20011001
>Organization:
Developer, The NetBSD Project
>Environment:
System: NetBSD chip 1.5Y NetBSD 1.5Y (CHIP) #238: Wed Oct 3 01:42:18 JST 2001 root@chip:/usr/obj/sys/arch/i386/compile/CHIP i386
Architecture: i386
Machine: i386
>Description:
battery_applet aborts saying "ioctl failed on /dev/apm".
>How-To-Repeat:
Add battery_applet to the panel.
>Fix:
Due to the recent API change to support multiple batteries.
--- battery/read-battery.c.orig Thu Aug 23 18:09:54 2001
+++ battery/read-battery.c Wed Oct 31 00:34:53 2001
@@ -211,6 +211,9 @@
return FALSE;
}
+#ifdef OAPM_IOC_GETPOWER
+ aip.batteryid = 0; /* APM BIOS, not a specific battery */
+#endif
if (ioctl(fd, APM_IOC_GETPOWER, &aip) == -1) {
g_error(_("ioctl failed on /dev/apm."));
return FALSE;
>Release-Note:
>Audit-Trail:
>Unformatted: