From owner-freebsd-ports Thu Jun 28 0:30:22 2001 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id DC62B37B405 for ; Thu, 28 Jun 2001 00:30:09 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f5S7U9c68484; Thu, 28 Jun 2001 00:30:09 -0700 (PDT) (envelope-from gnats) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by hub.freebsd.org (Postfix) with ESMTP id AEE9A37B405; Thu, 28 Jun 2001 00:29:55 -0700 (PDT) (envelope-from adsharma@sharmas.dhs.org) Received: from sharmas.dhs.org (cpe-66-1-147-119.ca.sprintbbd.net [66.1.147.119]) by falcon.mail.pas.earthlink.net (EL-8_9_3_3/8.9.3) with ESMTP id AAA08494; Thu, 28 Jun 2001 00:29:54 -0700 (PDT) Received: (from adsharma@localhost) by sharmas.dhs.org (8.11.3/8.11.3) id f5S7U5416019; Thu, 28 Jun 2001 00:30:05 -0700 (PDT) (envelope-from adsharma) Message-Id: <20010628003005.A15990@sharmas.dhs.org> Date: Thu, 28 Jun 2001 00:30:05 -0700 From: Arun Sharma To: FreeBSD-gnats-submit@freebsd.org Cc: mobile@freebsd.org X-Send-Pr-Version: 3.113 Subject: ports/28476: [PATCH] kdeutils2 - apm issue Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >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