2009-10-22 15:08:41 +00:00
|
|
|
commit 9ba88134bd6d296ccbcf253c6ade3e646dc286b9
|
2009-10-22 10:17:45 +00:00
|
|
|
Author: Nils Philippsen <nils@redhat.com>
|
2009-10-22 15:08:41 +00:00
|
|
|
Date: Thu Oct 22 17:05:30 2009 +0200
|
2009-10-22 10:17:45 +00:00
|
|
|
|
|
|
|
patch: udev
|
|
|
|
|
|
|
|
Squashed commit of the following:
|
|
|
|
|
2009-10-22 15:08:41 +00:00
|
|
|
commit a7541ac649bea3f352a249dfc569f3bc18b5a968
|
|
|
|
Author: Nils Philippsen <nils@redhat.com>
|
|
|
|
Date: Thu Oct 22 17:02:52 2009 +0200
|
|
|
|
|
|
|
|
don't set owner, group or mode
|
|
|
|
|
|
|
|
setting owner, group or mode may interfere with setting ACLs
|
|
|
|
|
2009-10-22 12:32:41 +00:00
|
|
|
commit e385558cf214d263af93147995f1f8b729d2dabe
|
|
|
|
Author: Nils Philippsen <nils@redhat.com>
|
|
|
|
Date: Thu Oct 22 14:19:53 2009 +0200
|
|
|
|
|
|
|
|
fix device file ownership and mode
|
|
|
|
|
2009-10-22 10:17:45 +00:00
|
|
|
commit fe874d6f9873598e8bcd9201508bc2c89365e821
|
|
|
|
Author: Nils Philippsen <nils@redhat.com>
|
|
|
|
Date: Thu Oct 22 11:16:16 2009 +0200
|
|
|
|
|
|
|
|
adapt generated udev rules for Fedora
|
|
|
|
|
|
|
|
diff --git a/tools/sane-desc.c b/tools/sane-desc.c
|
2009-10-22 15:08:41 +00:00
|
|
|
index c317700..2a410b2 100644
|
2009-10-22 10:17:45 +00:00
|
|
|
--- a/tools/sane-desc.c
|
|
|
|
+++ b/tools/sane-desc.c
|
2009-10-22 12:32:41 +00:00
|
|
|
@@ -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
|
|
|
|
@@ -3475,8 +3475,8 @@ print_udev (void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf ("\n");
|
|
|
|
- printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
|
|
|
|
- usbid->usb_vendor_id + 2, usbid->usb_product_id + 2, DEVMODE, DEVGROUP);
|
2009-10-22 15:08:41 +00:00
|
|
|
+ printf ("ATTR{idVendor}==\"%s\", ATTR{idProduct}==\"%s\", ENV{libsane_matched}=\"yes\"\n",
|
|
|
|
+ usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
|
2009-10-22 12:32:41 +00:00
|
|
|
usbid = usbid->next;
|
|
|
|
}
|
|
|
|
|
2009-10-22 15:08:41 +00:00
|
|
|
@@ -3488,7 +3488,7 @@ print_udev (void)
|
2009-10-22 10:17:45 +00:00
|
|
|
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]*\", NAME=\"%%k\", ATTRS{type}==\"6\", MODE=\"%s\", GROUP=\"%s\"\n", DEVMODE, DEVGROUP);
|
2009-10-22 15:08:41 +00:00
|
|
|
+ printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"6\", ENV{libsane_matched}=\"yes\"\n");
|
2009-10-22 10:17:45 +00:00
|
|
|
printf ("# Some scanners advertise themselves as SCSI device type 3\n");
|
|
|
|
|
|
|
|
while (scsiid)
|
2009-10-22 15:08:41 +00:00
|
|
|
@@ -3521,8 +3521,8 @@ print_udev (void)
|
2009-10-22 10:17:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
printf ("\n");
|
|
|
|
- printf ("KERNEL==\"sg[0-9]*\", NAME=\"%%k\", ATTRS{type}==\"3\", ATTRS{vendor}==\"%s\", ATTRS{model}==\"%s\", MODE=\"%s\", GROUP=\"%s\"\n",
|
|
|
|
- scsiid->scsi_vendor_id, scsiid->scsi_product_id, DEVMODE, DEVGROUP);
|
2009-10-22 15:08:41 +00:00
|
|
|
+ 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);
|
2009-10-22 10:17:45 +00:00
|
|
|
scsiid = scsiid->next;
|
|
|
|
}
|
|
|
|
printf ("LABEL=\"libsane_scsi_rules_end\"\n\n");
|