Date: Thu, 28 Jun 2001 00:30:05 -0700 From: Arun Sharma <arun@sharmas.dhs.org> To: FreeBSD-gnats-submit@freebsd.org Cc: mobile@freebsd.org Subject: ports/28476: [PATCH] kdeutils2 - apm issue Message-ID: <20010628003005.A15990@sharmas.dhs.org>
next in thread | raw e-mail | index | archive | help
>Number: 28476 >Category: ports >Synopsis: klaptop daemon incorrectly thinks that the battery time is 0 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 28 00:30:09 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Arun Sharma >Release: FreeBSD 4.3-STABLE i386 >Organization: >Environment: System: FreeBSD omni.mirabella.net 4.3-STABLE FreeBSD 4.3-STABLE #3: Fri Jun 22 20:28:18 PDT 2001 root@omni.mirabella.net:/usr/src/sys/compile/omni i386 >Description: When I pull out the AC line, KDE laptop daemon thinks that the battery time is 0 and suspends the machine. The following patch fixes the problem. >How-To-Repeat: Install KDE and enable apm on a FreeBSD laptop. >Fix: --- kdeutils-2.1.1/klaptopdaemon/portable.cpp- Thu Jun 28 00:08:02 2001 +++ kdeutils-2.1.1/klaptopdaemon/portable.cpp Thu Jun 28 00:08:22 2001 @@ -453,7 +453,7 @@ if (ret == -1) return 0; - return (info.ai_batt_time != 0xffff); + return (info.ai_batt_time != -1); } // @@ -638,7 +638,7 @@ p.powered = info.ai_acline; p.percentage = (info.ai_batt_life==255 ? 100 : info.ai_batt_life); - p.time = (info.ai_batt_time != 0xffff ? info.ai_batt_time/60 : -1); + p.time = (info.ai_batt_time != -1 ? info.ai_batt_time/60 : -1); return(p); bad: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010628003005.A15990>