forked from pool/powertop
23 lines
775 B
Diff
23 lines
775 B
Diff
|
commit 24a9f62c5b7f79500cd468876fa5323e689179a2
|
||
|
Author: Luca Tettamanti <kronos.it@gmail.com>
|
||
|
Date: Fri Aug 6 09:56:15 2010 -0700
|
||
|
|
||
|
readlink is failing because sizeof(link) returns the size of 'link'
|
||
|
which is a function, not the intended char buffer. Fix the typo.
|
||
|
|
||
|
Signed-off-by: Luca Tettamanti <kronos.it@gmail.com>
|
||
|
|
||
|
diff --git a/usb.c b/usb.c
|
||
|
index f3a1bef..44d3252 100644
|
||
|
--- a/usb.c
|
||
|
+++ b/usb.c
|
||
|
@@ -52,7 +52,7 @@ void activate_usb_autosuspend(void)
|
||
|
/* skip usb input devices */
|
||
|
sprintf(filename, "/sys/bus/usb/devices/%s/driver", dirent->d_name);
|
||
|
memset(linkto, 0, sizeof(linkto));
|
||
|
- len = readlink(filename, linkto, sizeof(link) - 1);
|
||
|
+ len = readlink(filename, linkto, sizeof(linkto) - 1);
|
||
|
if (strstr(linkto, "usbhid"))
|
||
|
continue;
|
||
|
|