kopia lustrzana https://gitlab.com/sane-project/backends
HAL 0.5.11-rc2 does not support the info.bus property anymore; superseded by
info.subsystem. Unfortunately, this is not backward-compatible, so add a new "hal-new" mode to sane-desc.merge-requests/1/head
rodzic
8ed0d66582
commit
95f01b7244
|
@ -6,6 +6,10 @@
|
|||
the devicename is not a filename. Construct an IPC key based on
|
||||
the product ID, bus number and device number for libusb devices,
|
||||
otherwise fallback to ftok() and check its return value.
|
||||
* tools/sane-desc.c: HAL 0.5.11-rc2 does not support the info.bus
|
||||
property anymore; superseded by info.subsystem. Unfortunately,
|
||||
this is not backward-compatible, so add a new "hal-new" mode to
|
||||
sane-desc.
|
||||
|
||||
2008-03-28 m. allan noah <kitno455 a t gmail d o t com>
|
||||
* backend/hp-scl.c: add usleep to improve usb performance, from
|
||||
|
|
|
@ -77,7 +77,8 @@ typedef enum output_mode
|
|||
output_mode_db,
|
||||
output_mode_udev,
|
||||
output_mode_plist,
|
||||
output_mode_hal
|
||||
output_mode_hal,
|
||||
output_mode_halnew
|
||||
}
|
||||
output_mode;
|
||||
|
||||
|
@ -293,7 +294,7 @@ print_usage (char *program_name)
|
|||
"(multiple directories can be concatenated by \":\")\n");
|
||||
printf (" -m|--mode mode "
|
||||
"Output mode (ascii, html-backends-split, html-mfgs,\n"
|
||||
" xml, statistics, usermap, db, udev, plist, hal)\n");
|
||||
" xml, statistics, usermap, db, udev, plist, hal, hal-new)\n");
|
||||
printf (" -t|--title \"title\" The title used for HTML pages\n");
|
||||
printf (" -i|--intro \"intro\" A short description of the "
|
||||
"contents of the page\n");
|
||||
|
@ -400,6 +401,11 @@ get_options (int argc, char **argv)
|
|||
DBG_INFO ("Output mode: %s\n", optarg);
|
||||
mode = output_mode_hal;
|
||||
}
|
||||
else if (strcmp (optarg, "hal-new") == 0)
|
||||
{
|
||||
DBG_INFO ("Output mode: %s\n", optarg);
|
||||
mode = output_mode_halnew;
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_ERR ("Unknown output mode: %s\n", optarg);
|
||||
|
@ -3272,14 +3278,17 @@ print_plist (void)
|
|||
|
||||
|
||||
static void
|
||||
print_hal (void)
|
||||
print_hal (int new)
|
||||
{
|
||||
int i;
|
||||
usbid_type *usbid = create_usbids_table ();
|
||||
printf ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
|
||||
printf ("<deviceinfo version=\"0.2\">\n");
|
||||
printf (" <device>\n");
|
||||
printf (" <match key=\"info.bus\" string=\"usb\">\n");
|
||||
if (new)
|
||||
printf (" <match key=\"info.subsystem\" string=\"usb\">\n");
|
||||
else
|
||||
printf (" <match key=\"info.bus\" string=\"usb\">\n");
|
||||
while (usbid)
|
||||
{
|
||||
manufacturer_model_type * name = usbid->name;
|
||||
|
@ -3353,7 +3362,10 @@ main (int argc, char **argv)
|
|||
print_plist ();
|
||||
break;
|
||||
case output_mode_hal:
|
||||
print_hal ();
|
||||
print_hal (0);
|
||||
break;
|
||||
case output_mode_halnew:
|
||||
print_hal (1);
|
||||
break;
|
||||
default:
|
||||
DBG_ERR ("Unknown output mode\n");
|
||||
|
|
Ładowanie…
Reference in New Issue