From ba900ddc747cb89c2600c60a1391862e918541d2 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Wed, 5 May 2010 11:49:10 +0200 Subject: [PATCH] patch: udev Squashed commit of the following: commit eecfce287372abf2b336f0d6870611445170645b Author: Nils Philippsen Date: Wed May 5 11:14:59 2010 +0200 adapt generated udev rules for Fedora --- tools/sane-desc.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tools/sane-desc.c b/tools/sane-desc.c index 658555e..0b24e3b 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,8 +3525,8 @@ 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; } @@ -3538,7 +3538,7 @@ print_udev (void) 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\"\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\"\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.6.6.1