summaryrefslogtreecommitdiffstats
path: root/source/l/hal/patches/fix_ioperm_arguments.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2010-05-19 08:58:23 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:43:05 +0200
commitb76270bf9e6dd375e495fec92140a79a79415d27 (patch)
tree3dbed78b2279bf9f14207a16dc634b90995cbd40 /source/l/hal/patches/fix_ioperm_arguments.patch
parent5a12e7c134274dba706667107d10d231517d3e05 (diff)
downloadcurrent-b76270bf9e6dd375e495fec92140a79a79415d27.tar.gz
current-b76270bf9e6dd375e495fec92140a79a79415d27.tar.xz
Slackware 13.1slackware-13.1
Wed May 19 08:58:23 UTC 2010 Slackware 13.1 x86_64 stable is released! Lots of thanks are due -- see the RELEASE_NOTES and the rest of the ChangeLog for credits. The ISOs are on their way to replication, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We are taking pre-orders now at store.slackware.com, and offering a discount if you sign up for a subscription. Consider picking up a copy to help support the project. Thanks again to the Slackware community for testing, contributing, and generally holding us to a high level of quality. :-) Enjoy!
Diffstat (limited to 'source/l/hal/patches/fix_ioperm_arguments.patch')
-rw-r--r--source/l/hal/patches/fix_ioperm_arguments.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/source/l/hal/patches/fix_ioperm_arguments.patch b/source/l/hal/patches/fix_ioperm_arguments.patch
new file mode 100644
index 000000000..833e07566
--- /dev/null
+++ b/source/l/hal/patches/fix_ioperm_arguments.patch
@@ -0,0 +1,40 @@
+commit 597c1ffffd61a15a334ce42f2a569c59f0270bcb
+Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
+Date: Thu Feb 25 02:25:18 2010 -0800
+
+ Fix incorrect arguments to ioperm() call
+
+ The second argument of ioperm() is not the last port to be accessed
+ but rather length of the port range [port, port + len).
+
+ Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
+ Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com>
+
+diff --git a/hald/linux/addons/addon-imac-backlight.c b/hald/linux/addons/addon-imac-backlight.c
+index e869192..54e4ea3 100644
+--- a/hald/linux/addons/addon-imac-backlight.c
++++ b/hald/linux/addons/addon-imac-backlight.c
+@@ -158,7 +158,8 @@ main (int argc, char **argv)
+ goto out;
+ }
+
+- if (ioperm(0xB2, 0xB3, 1) < 0)
++ /* Allow access to ports 0xB2 and 0xB3 */
++ if (ioperm(0xB2, 2, 1) < 0)
+ {
+ HAL_ERROR (("ioperm failed (you should be root)."));
+ exit(1);
+diff --git a/hald/linux/addons/addon-macbookpro-backlight.c b/hald/linux/addons/addon-macbookpro-backlight.c
+index 2a6fef6..c1bbbac 100644
+--- a/hald/linux/addons/addon-macbookpro-backlight.c
++++ b/hald/linux/addons/addon-macbookpro-backlight.c
+@@ -507,7 +507,8 @@ main (int argc, char *argv[])
+ state = INREG(0x7ae4);
+ OUTREG(0x7ae4, state);
+
+- if (ioperm (0x300, 0x304, 1) < 0) {
++ /* Allow access to porta 0x300 through 0x304 */
++ if (ioperm (0x300, 5, 1) < 0) {
+ HAL_ERROR (("ioperm failed (you should be root)."));
+ exit(1);
+ }