Package: acpi-support Version: 0.90-3 Severity: wishlist Tags: patch Hi, I created some patches to simplify the scripts in acpi-support. Feel free to include. Kind regards Nico
-- System Information: Debian Release: 4.0 APT prefers unstable APT policy: (500, 'unstable') Architecture: i386 (i686) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.18-3-686 Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15) Versions of packages acpi-support depends on: ii acpid 1.0.4-5 Utilities for using ACPI power man ii dmidecode 2.8-4 Dump Desktop Management Interface ii finger 0.17-10 user information lookup program ii hdparm 6.9-1 tune hard disk parameters for high ii laptop-detect 0.12.1 attempt to detect a laptop ii libc6 2.3.6.ds1-10 GNU C Library: Shared libraries ii lsb-base 3.1-22 Linux Standard Base 3.1 init scrip ii powermgmt-base 1.29 Common utils and configs for power ii radeontool 1.5-5 utility to control ATI Radeon back ii toshset 1.72-2 Access much of the Toshiba laptop ii vbetool 0.7-1.1 run real-mode video BIOS code to a ii xbase-clients 1:7.1.ds1-2 miscellaneous X clients Versions of packages acpi-support recommends: pn laptop-mode-tools <none> (no description available) -- no debconf information -- Nico Golde - http://www.ngolde.de JAB: [EMAIL PROTECTED] - GPG: 0x73647CFF Forget about that mouse with 3/4/5 buttons, gimme a keyboard with 103/104/105 keys!
--- acpi-support-0.90-bckp/acpi_fakekey.c 2007-02-10 23:44:57.000000000 +0100
+++ acpi-support-0.90-work/acpi_fakekey.c 2007-02-10 23:52:03.000000000 +0100
@@ -9,27 +9,30 @@
int find_keyboard() {
int i, j;
- int fd;
- char filename[32];
- char key_bitmask[(KEY_MAX + 7) / 8];
+ int fd;
+ char filename[32];
+ char key_bitmask[(KEY_MAX + 7) / 8];
- for (i=0; i<32; i++) {
- snprintf(filename,sizeof(filename), "/dev/input/event%d", i);
+ for (i=0; i<32; i++) {
+ snprintf(filename,sizeof(filename), "/dev/input/event%d", i);
- fd = open(filename, O_RDWR);
- ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
+ if((fd = open(filename, O_RDWR))<0){
+ perror("open");
+ exit(EXIT_FAILURE);
+ }
+ ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(key_bitmask)), key_bitmask);
for (j = 0; j < BTN_MISC; j++) {
if (TestBit(j, key_bitmask))
break;
}
- if (j < BTN_MISC) {
- return fd;
- }
+ if (j < BTN_MISC) {
+ return fd;
+ }
close (fd);
- }
- return 0;
+ }
+ return 0;
}
int main(int argc, char** argv) {
@@ -38,17 +41,13 @@
struct input_event event;
if (argc == 2) {
- key = atoi(argv[1]);
+ key = strtol(argv[1], NULL, 10);
} else {
- return 1;
+ return -1;
}
fd = find_keyboard();
- if (!fd) {
- return 2;
- }
-
event.type = EV_KEY;
event.code = key;
event.value = 1;
--- acpi-support-0.90-bckp/asus-touchpad.sh 2007-02-10 23:44:57.000000000 +0100
+++ acpi-support-0.90-work/asus-touchpad.sh 2007-02-10 23:45:37.000000000 +0100
@@ -1,7 +1,7 @@
#!/bin/sh
# get the current state of the touchpad
-TPSTATUS=`synclient -l | grep TouchpadOff | awk '{print $3}'`
+TPSTATUS=`synclient -l | awk '{/TouchpadOff/ print $3}'`
# if getting the status failed, exit
test -z $TPSTATUS && exit 1
--- acpi-support-0.90-bckp/asus-wireless.sh 2007-02-10 23:44:57.000000000 +0100
+++ acpi-support-0.90-work/asus-wireless.sh 2007-02-10 23:59:38.000000000 +0100
@@ -1,7 +1,7 @@
#!/bin/bash
# Find and enable/disable wireless devices
-state=`. /etc/acpi/wireless.sh`
+state=$((`cat /proc/acpi/asus/wled`)
if [ "$state" = "0" ]; then
echo -n 0 > /proc/acpi/asus/wled
--- acpi-support-0.90-bckp/debian/compat 2007-02-10 23:44:57.000000000 +0100 +++ acpi-support-0.90-work/debian/compat 2007-02-11 00:08:02.000000000 +0100 @@ -1 +1 @@ -4 +5
--- acpi-support-0.90-bckp/webbtn.sh 2007-02-10 23:44:57.000000000 +0100 +++ acpi-support-0.90-work/webbtn.sh 2007-02-11 00:05:03.000000000 +0100 @@ -1,3 +1,2 @@ #!/bin/bash -. /usr/share/acpi-support/key-constants -acpi_fakekey $KEY_WWW +sensible-browser &
signature.asc
Description: Digital signature

