2008-02-13 09:20:14 +00:00
|
|
|
diff -up sane-backends-1.0.19/tools/sane-desc.c.policykit sane-backends-1.0.19/tools/sane-desc.c
|
|
|
|
--- sane-backends-1.0.19/tools/sane-desc.c.policykit 2007-07-29 20:39:54.000000000 +0200
|
|
|
|
+++ sane-backends-1.0.19/tools/sane-desc.c 2008-02-13 10:18:23.000000000 +0100
|
2008-02-07 10:11:41 +00:00
|
|
|
@@ -3226,7 +3226,7 @@ print_udev (void)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf ("\n");
|
|
|
|
- printf ("SYSFS{idVendor}==\"%s\", SYSFS{idProduct}==\"%s\", MODE=\"0664\", GROUP=\"scanner\", ENV{libsane_matched}=\"yes\"\n",
|
|
|
|
+ printf ("SYSFS{idVendor}==\"%s\", SYSFS{idProduct}==\"%s\", MODE=\"0664\", ENV{libsane_matched}=\"yes\"\n",
|
|
|
|
usbid->usb_vendor_id + 2, usbid->usb_product_id + 2);
|
|
|
|
usbid = usbid->next;
|
|
|
|
}
|
2008-02-13 09:20:14 +00:00
|
|
|
@@ -3278,8 +3278,17 @@ print_hal (void)
|
|
|
|
usbid_type *usbid = create_usbids_table ();
|
2008-02-07 10:11:41 +00:00
|
|
|
printf ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
|
|
|
|
printf ("<deviceinfo version=\"0.2\">\n");
|
2008-02-13 09:20:14 +00:00
|
|
|
- printf (" <device>\n");
|
2008-02-07 10:11:41 +00:00
|
|
|
- printf (" <match key=\"info.bus\" string=\"usb\">\n");
|
2008-02-13 09:20:14 +00:00
|
|
|
+ printf (" <device>\n\n");
|
|
|
|
+ printf (" <!-- SCSI scanners -->\n");
|
|
|
|
+ printf (" <match key=\"@info.parent:scsi.type\" string=\"scanner\">\n");
|
|
|
|
+ printf (" <match key=\"info.category\" string=\"scsi_generic\">\n");
|
|
|
|
+ printf (" <append key=\"info.capabilities\" type=\"strlist\">access_control</append>\n");
|
|
|
|
+ printf (" <merge key=\"access_control.file\" type=\"copy_property\">linux.device_file</merge>\n");
|
|
|
|
+ printf (" <merge key=\"access_control.type\" type=\"string\">scanner</merge>\n");
|
|
|
|
+ printf (" </match>\n");
|
|
|
|
+ printf (" </match>\n\n");
|
|
|
|
+ printf (" <!-- USB scanners -->\n");
|
2008-02-07 10:11:41 +00:00
|
|
|
+ printf (" <match key=\"info.bus\" string=\"usb_device\">\n");
|
|
|
|
while (usbid)
|
|
|
|
{
|
|
|
|
manufacturer_model_type * name = usbid->name;
|
2008-02-13 09:20:14 +00:00
|
|
|
@@ -3295,10 +3304,12 @@ print_hal (void)
|
2008-02-07 10:11:41 +00:00
|
|
|
i++;
|
|
|
|
}
|
|
|
|
printf (" -->\n");
|
|
|
|
- printf (" <match key=\"usb.vendor_id\" int=\"%s\">\n", usbid->usb_vendor_id);
|
|
|
|
- printf (" <match key=\"usb.product_id\" int=\"%s\">\n", usbid->usb_product_id);
|
|
|
|
- printf (" <append key=\"info.capabilities\" type=\"strlist\">scanner</append>\n");
|
|
|
|
- printf (" <merge key=\"scanner.access_method\" type=\"string\">proprietary</merge>\n");
|
|
|
|
+ printf (" <match key=\"usb_device.vendor_id\" int=\"%s\">\n", usbid->usb_vendor_id);
|
|
|
|
+ printf (" <match key=\"usb_device.product_id\" int=\"%s\">\n", usbid->usb_product_id);
|
|
|
|
+ printf (" <append key=\"info.capabilities\" type=\"strlist\">access_control</append>\n");
|
|
|
|
+ printf (" <merge key=\"access_control.file\" type=\"copy_property\">linux.device_file</merge>\n");
|
|
|
|
+ printf (" <merge key=\"access_control.type\" type=\"string\">scanner</merge>\n");
|
|
|
|
+ printf (" <append key=\"info.callouts.add\" type=\"strlist\">hal-usb-scanner-add</append>\n");
|
|
|
|
printf (" </match>\n");
|
|
|
|
printf (" </match>\n");
|
|
|
|
usbid = usbid->next;
|