diff --git a/ChangeLog b/ChangeLog index 4e904a236..1688d3c64 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * backend/hp-scl.c: add usleep to improve usb performance, from diff --git a/tools/sane-desc.c b/tools/sane-desc.c index 5d03dae0b..eed432e16 100644 --- a/tools/sane-desc.c +++ b/tools/sane-desc.c @@ -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 ("\n"); printf ("\n"); printf (" \n"); - printf (" \n"); + if (new) + printf (" \n"); + else + printf (" \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");