[Pkg-acpi-devel] Bug#636254: `acpi -p -a` fails to report power state if `/proc/acpi/ac_adapter/*/status` is used
Daniel T Chen
seven.steps at gmail.com
Mon Aug 1 19:04:15 UTC 2011
Package: acpi
Version: 1.5-3
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu oneiric ubuntu-patch
In Ubuntu, the attached patch was applied to achieve the following:
* Apply patch from Lekensteyn resolving improper query involving
case sensitivity resulting in null result from `acpi -p -a'.
(LP: #818184)
Thanks for considering the patch.
-- System Information:
Debian Release: wheezy/sid
APT prefers oneiric-updates
APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 'oneiric-proposed'), (500, 'oneiric')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-7-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
-------------- next part --------------
--- acpi-1.5.orig/acpi.c
+++ acpi-1.5/acpi.c
@@ -429,7 +429,7 @@
fields = adapter->data;
while (fields) {
value = fields->data;
- if (!strcmp(value->attr, "state") || !strcmp(value->attr, "Status"))
+ if (!strcmp(value->attr, "state") || !strcmp(value->attr, "status"))
state = value->value;
else if (!strcmp(value->attr, "online"))
state = get_unit_value(value->value) ? "on-line" : "off-line";
More information about the Pkg-acpi-devel
mailing list