sane-backends/sane-backends-1.0.23-udev.patch
Nils Philippsen c3a3750c07 version 1.0.23
update udev patch, remove obsolete patches
2012-08-31 16:31:33 +02:00

43 lines
1.5 KiB
Diff

commit 2fd4ea713546ef0cb9f67ee7853e9b1d01f64071
Author: Nils Philippsen <nils@redhat.com>
AuthorDate: Fri Aug 31 15:54:01 2012 +0200
Commit: Nils Philippsen <nils@redhat.com>
CommitDate: Fri Aug 31 15:54:01 2012 +0200
patch: udev
Squashed commit of the following:
commit 99a4a33bd297f5b475ac610cf2d51385893596b9
Author: Nils Philippsen <nils@redhat.com>
Date: Fri Aug 31 15:51:55 2012 +0200
adapt generated udev rules for Fedora
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
index 7bbd012..9447cb8 100644
--- a/tools/sane-desc.c
+++ b/tools/sane-desc.c
@@ -56,9 +56,9 @@
#define COLOR_NEW "\"#F00000\""
#define COLOR_UNKNOWN "\"#000000\""
-#define DEVMODE "0664"
+#define DEVMODE "0644"
#define DEVOWNER "root"
-#define DEVGROUP "scanner"
+#define DEVGROUP "root"
#ifndef PATH_MAX
# define PATH_MAX 1024
@@ -3543,7 +3543,8 @@ 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 '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("ENV{libsane_matched}==\"yes\", TEST==\"power/control\", ATTR{power/control}=\"on\"\n");
+ printf("ENV{libsane_matched}==\"yes\", TEST!=\"power/control\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n");
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");