sane-backends/sane-backends-1.0.22-udev.patch
Nils Philippsen 4c4b8135b8 version 1.0.22
remove obsolete i18n, xerox-mfp-color-mode, epson2-fixes, open-macro patches
update pkgconfig, udev, docs-utf8, v4l, man-encoding patches
submit patches upstream where this is applicable, add comments
manually install pkg-config file
2011-03-16 18:17:05 +01:00

72 lines
2.8 KiB
Diff

From 89ca3fb1306f5e809c94c9d059b3c39b4fe50ec8 Mon Sep 17 00:00:00 2001
From: Nils Philippsen <nils@redhat.com>
Date: Mon, 14 Mar 2011 17:15:20 +0100
Subject: [PATCH] patch: udev
Squashed commit of the following:
commit cad1db5c3a1f735e2425655db6005d2b05169288
Author: Nils Philippsen <nils@redhat.com>
Date: Mon Mar 14 17:07:32 2011 +0100
adapt generated udev rules for Fedora
---
tools/sane-desc.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
index ad3a134..fea2f6b 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
@@ -3525,20 +3525,20 @@ print_udev (void)
}
}
printf ("\n");
- printf ("ATTRS{idVendor}==\"%s\", ATTRS{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
- usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVGROUP);
+ printf ("ATTRS{idVendor}==\"%s\", ATTRS{idProduct}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
usbid = usbid->next;
}
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\", TEST==\"power/level\", ATTR{power/level}=\"on\"\n");
printf ("\nLABEL=\"libsane_usb_rules_end\"\n\n");
printf ("SUBSYSTEMS!=\"scsi\", GOTO=\"libsane_scsi_rules_end\"\n\n");
printf ("LABEL=\"libsane_scsi_rules_begin\"\n");
printf ("# Generic: SCSI device type 6 indicates a scanner\n");
- printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"6\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n", DEVMODE, DEVGROUP);
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"6\", ENV{libsane_matched}=\"yes\"\n");
printf ("# Some scanners advertise themselves as SCSI device type 3\n");
while (scsiid)
@@ -3571,8 +3571,8 @@ print_udev (void)
}
}
printf ("\n");
- printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
- scsiid->scsi_vendor_id, scsiid->scsi_product_id, DEVMODE, DEVGROUP);
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
+ scsiid->scsi_vendor_id, scsiid->scsi_product_id);
scsiid = scsiid->next;
}
printf ("LABEL=\"libsane_scsi_rules_end\"\n\n");
--
1.7.4