[Pkg-acpi-devel] Bug#653281: Fix /proc/acpi/wakeup number of entries and device_name size

Carlos Alberto Lopez Perez clopez at igalia.com
Mon Dec 26 12:43:25 UTC 2011


Package: acpitool
Version: 0.5.1-2
Tags: patch
Forwarded: davidleemans at scarlet.be



Hello,


I am attaching a small patch that solves two bugs that I found in
acpitool wakeup device handling functions ( $ acpitool -w )


 * The file /proc/acpi/wakeup can have much more than maximum 25
   hardcoded entries.
   For example: In my computer (Dell E6420) I have 27 entries.
   So instead of using an array of [25] entries better use dynamic
   vectors and push the new entries when a new line from the file
   is read.


 * The name of the device is not ever 4 characters. For example I
   have a device called "LID" which is 3 characters long.
   Instead of using a fixed size for the device we split the line
   on the first tab (\t) and use the first part.


Without this patch acpitool will silently fail to change the wakeup
status of any device ( $ acpitool -W XX ) were XX is greater than 25 or
where the device name is not 4 characters long.


I already sent this patch to upstream but they told me that they don't
know when they will release a new version.


So in the meantime please consider adding this to Debian


The patch is against acpitool-0.5.1.tar.gz, I guess it should apply
smoothly if you push it into debian/patches.


Regards!

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Carlos Alberto Lopez Perez                           http://neutrino.es
Igalia - Free Software Engineering                http://www.igalia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Use-dynamic-structures-instead-of-predefined-ones.patch
Type: text/x-patch
Size: 2570 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-acpi-devel/attachments/20111226/673bd7ef/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-acpi-devel/attachments/20111226/673bd7ef/attachment.pgp>


More information about the Pkg-acpi-devel mailing list