NetBSD Problem Report #15577

Received: (qmail 29724 invoked from network); 11 Feb 2002 09:36:52 -0000
Message-Id: <xofvgd48imk.fsf@blubb.pdc.kth.se>
Date: 11 Feb 2002 10:36:51 +0100
From: joda@pdc.kth.se (Johan Danielsson)
Reply-To: joda@pdc.kth.se
To: gnats-bugs@gnats.netbsd.org
Subject: gkrellm apm driver doesn't always work

>Number:         15577
>Category:       pkg
>Synopsis:       gkrellm apm driver doesn't always work
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    pkg-manager
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 11 09:37:01 +0000 2002
>Closed-Date:    Wed Feb 13 23:12:18 +0000 2002
>Last-Modified:  Wed Feb 13 23:12:18 +0000 2002
>Originator:     Johan Danielsson
>Release:        NetBSD 1.5ZA
>Organization:
	<organization of PR author (multiple lines)>
>Environment:
System: NetBSD blubb.pdc.kth.se 1.5ZA NetBSD 1.5ZA (BLUBB) #401: Tue Jan 22 11:29:10 CET 2002 joda@blubb.pdc.kth.se:/usr/misc/src/netbsd/netbsd-cvs/src/sys/arch/i386/compile/BLUBB i386
Architecture: i386
Machine: i386
>Description:

The apm_power_info structure has to zeroed, otherwise you get info for
random batteries (that may not exist).

>How-To-Repeat:
>Fix:
--- work/gkrellm-1.2.4/src/apm.c~       Mon Oct 22 05:26:05 2001
+++ work/gkrellm-1.2.4/src/apm.c        Mon Feb 11 10:16:52 2002
@@ -145,6 +145,7 @@
    struct apm_power_info info;

    if ((f = open(APMDEV, O_RDONLY)) == -1) return;
+   memset(&info, 0, sizeof(info));
    r = ioctl(f, APM_IOC_GETPOWER, &info);
    close(f);
    if (r == -1) return;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: wiz 
State-Changed-When: Wed Feb 13 15:11:29 PST 2002 
State-Changed-Why:  
Added the patch to pkgsrc. Thanks. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.