On Fri, 08.01.10 09:15, David K?gedal (davidk at lysator.liu.se) wrote: > >> > These two ultimately come from UDEV: > >> > > >> > udev_device_get_property_value(card, "ID_MODEL_FROM_DATABASE") > >> > and > >> > udev_device_get_property_value(card, "ID_SERIAL") > >> > > >> > So I guess udev puts the underscores in. > >> > >> Thank you. Finally a pointing finger. > >> > >> So why is udev giving us a mangled name? And why is PA using that, > >> rather than using the information it obviously can get from the device? > > > > Because we trust udev. And we want to keep the bus-specific code in PA > > at a minimum. > > That sounds sensible. And "udevadm info --path=/sys/bus/usb/devices/2-4.4 > --query=property | grep ID_MODEL" does show the broken name (and there > is no ID_MODEL_FROM_DATABASE). > > I guess I'll move my complaints to the udev people (or possibly the > Ubuntu people) and see what emerges. udev actually sets two props: ID_MODEL and ID_MODEL_ENC. The former has all special chars (including spaces) replaced by underscore. The latter has them escape in a \x20 like notation. I have now modified PA to use ID_MODEL_ENC and undo the encoding. You should now get the USB supplied names without underscores. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4