`acpi -p -a` fails to report power state if `/proc/acpi/ac_adapter/*/status` is used
Bug #818184 reported by
Peter Wu
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
acpi |
New
|
Undecided
|
Unassigned | ||
acpi (Debian) |
Fix Released
|
Unknown
|
|||
acpi (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
`acpi` bases the attribute name on the file name. When using the older `/proc`, the attribute that is used to report the AC adapter state (connectd = on-line; disconnected = off-line) is either `state` or `status`.
However, acpi.c:432 does a case-sensitive comparison to Status. That will never match since the files `state` and `status` are always lowercase (at least, those lowercase files are queried). The patch is really simple, it modifies `Status` to `status`.
Related branches
summary: |
- `acpi -p -a` can fail to report state if - `/proc/acpi/ac_adapter/*/status` needs to be used + `acpi -p -a` fails to report power state if + `/proc/acpi/ac_adapter/*/status` is used |
tags: |
added: patch-forwarded-debian removed: patch |
Changed in acpi (Debian): | |
status: | Unknown → New |
Changed in acpi (Debian): | |
status: | New → Fix Released |
To post a comment you must log in.
This bug was fixed in the package acpi - 1.5-3ubuntu1
---------------
acpi (1.5-3ubuntu1) oneiric; urgency=low
* Apply patch from Lekensteyn resolving improper query involving
case sensitivity resulting in null result from `acpi -p -a'.
(LP: #818184)
-- Daniel T Chen <email address hidden> Mon, 01 Aug 2011 14:57:12 -0400