[Pkg-wmaker-commits] [wmbattery] 75/241: merge from sleepd

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 24 23:37:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch master
in repository wmbattery.

commit 14ac0711fb21dedcdf86d3ff6db2300640049f4e
Author: joey <joey at a4a2c43b-8ac3-0310-8836-e0e880c912e2>
Date:   Thu Jan 25 03:20:42 2007 +0000

    merge from sleepd
---
 acpi.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/acpi.c b/acpi.c
index d9433fb..2ff7d42 100644
--- a/acpi.c
+++ b/acpi.c
@@ -281,6 +281,16 @@ int acpi_supported (void) {
 int acpi_read (int battery, apm_info *info) {
 	char *buf, *state;
 	
+	if (acpi_batt_count == 0) {
+		info->battery_percentage = 0;
+		info->battery_time = 0;
+		info->battery_status = BATTERY_STATUS_ABSENT;
+		acpi_batt_capacity[battery] = 0;
+		/* Where else would the power come from, eh? ;-) */
+		info->ac_line_status = 1;
+		return 0;
+	}
+	
 	/* Internally it's zero indexed. */
 	battery--;
 	

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmbattery.git



More information about the Pkg-wmaker-commits mailing list