Use power/control instead of power/level if available

merge-requests/1/head
Julien BLACHE 2011-03-19 17:51:10 +01:00
rodzic b1da70e585
commit cd376be4af
2 zmienionych plików z 5 dodań i 1 usunięć

Wyświetl plik

@ -1,3 +1,7 @@
2011-03-19 Julien Blache <jb@jblache.org>
* tools/sane-desc.c: move away from using power/level for disabling
USB autosuspend/power management and use power/control if available.
2011-03-18 Stéphane Voltz <stef.dev@free.fr>
* backend/genesys_low.c backend/genesys.c : rewrite big endian fixes
for gl847/gl124 based scanners. Improve calibration cache file handling.

Wyświetl plik

@ -3531,7 +3531,7 @@ print_udev (void)
}
printf("\n# The following rule will disable USB autosuspend for the device\n");
printf("ENV{libsane_matched}==\"yes\", RUN+=\"/bin/sh -c 'test -e /sys/$env{DEVPATH}/power/level && echo on > /sys/$env{DEVPATH}/power/level'\"\n");
printf("ENV{libsane_matched}==\"yes\", RUN+=\"/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'\"\n");
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");