blob: 6298539d483446feed5e1ebf696e19d464cf1796 [file] [log] [blame]
--- tools/sane-desc.c 2008-02-07 09:09:16.000000000 +0100
+++ tools/sane-desc.c.new 2008-02-07 09:27:19.000000000 +0100
@@ -3157,7 +3157,7 @@
printf
("#\n"
- "# udev rules file for supported USB devices\n"
+ "# udev rules file for supported USB and SCSI devices\n"
"#\n"
"# To add a USB device, add a rule to the list below between the\n"
"# LABEL=\"libsane_rules_begin\" and LABEL=\"libsane_rules_end\" lines.\n"
@@ -3180,9 +3180,11 @@
print_udev_header ();
printf("ACTION!=\"add\", GOTO=\"libsane_rules_end\"\n"
+ "SUBSYSTEMS==\"scsi\", ATTRS{type}==\"3|6\", MODE=\"660\", GROUP=\"scanner\"\n"
"ENV{DEVTYPE}==\"usb_device\", GOTO=\"libsane_create_usb_dev\"\n"
"SUBSYSTEM==\"usb_device\", GOTO=\"libsane_rules_begin\"\n"
- "SUBSYSTEM!=\"usb_device\", GOTO=\"libsane_rules_end\"\n"
+ "SUBSYSTEM!=\"usb|usb_device\", GOTO=\"libsane_rules_end\"\n"
+ "SUBSYSTEM==\"usb\", ENV{DEVTYPE}!=\"usb_device\" ,GOTO=\"libsane_rules_end\"\n"
"\n");
printf("# Kernel >= 2.6.22 jumps here\n"
@@ -3226,7 +3228,7 @@
}
}
printf ("\n");
- printf ("SYSFS{idVendor}==\"%s\", SYSFS{idProduct}==\"%s\", MODE=\"0664\", GROUP=\"scanner\", ENV{libsane_matched}=\"yes\"\n",
+ printf ("ATTRS{idVendor}==\"%s\", ATTRS{idProduct}==\"%s\", MODE=\"0664\", GROUP=\"scanner\", ENV{libsane_matched}=\"yes\"\n",
usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
usbid = usbid->next;
}