Add wildcard for some Epson scanners

merge-requests/1/head
Julien BLACHE 2011-06-24 22:08:52 +02:00
rodzic a4643d888e
commit ed0d09f863
2 zmienionych plików z 20 dodań i 0 usunięć

Wyświetl plik

@ -1,3 +1,8 @@
2011-06-24 Julien Blache <jb@jblache.org>
* tools/sane-desc.c: add a wildcard rule for Epson SCSI scanners
with a model string beginning with "SCANNER". Idea from Olaf
Meeuwissen.
2011-06-21 Julien Blache <jb@jblache.org>
* doc/descriptions/epson2.desc: added SCSI IDs for the GT-10000+,
reported by Simon Becherer.

Wyświetl plik

@ -3559,6 +3559,13 @@ print_udev (void)
printf ("# Some scanners advertise themselves as SCSI device type 3\n");
printf ("# Wildcard: for some Epson SCSI scanners\n");
if (mode == output_mode_udevacl)
printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"EPSON\", ATTRS{model}==\"SCANNER*\", ENV{libsane_matched}=\"yes\"\n");
else
printf ("KERNEL==\"sg[0-9]*\", ATTRS{type}==\"3\", ATTRS{vendor}==\"EPSON\", ATTRS{model}==\"SCANNER*\", MODE=\"%s\", GROUP=\"%s\", ENV{libsane_matched}=\"yes\"\n",
DEVMODE, DEVGROUP);
while (scsiid)
{
manufacturer_model_type * name = scsiid->name;
@ -3569,6 +3576,14 @@ print_udev (void)
continue;
}
/* Wildcard for Epson scanners: vendor = EPSON, product = SCANNER* */
if ((strcmp(scsiid->scsi_vendor_id, "EPSON") == 0)
&& (strncmp(scsiid->scsi_product_id, "SCANNER", 7) == 0))
{
scsiid = scsiid->next;
continue;
}
i = 0;
printf ("# ");
while (name)