data = udev_device_get_property_value(dev, "ID_SERIAL_SHORT");
if(!data)
data = udev_device_get_property_value(dev, "ID_SERIAL");
- if (data)
+ if (data) {
prop->serial = xstrdup(data);
+ normalize_whitespace((unsigned char *) prop->serial);
+ }
if ((data = udev_device_get_property_value(dev, "ID_MODEL_ENC"))) {
prop->model = xstrdup(data);
unhexmangle_string(prop->model);
normalize_whitespace((unsigned char *) prop->model);
- } else if ((data = udev_device_get_property_value(dev, "ID_MODEL")))
+ } else if ((data = udev_device_get_property_value(dev, "ID_MODEL"))) {
prop->model = xstrdup(data);
+ normalize_whitespace((unsigned char *) prop->model);
+ }
udev_device_unref(dev);
DBG(DEV, ul_debugobj(ld, "%s: found udev properties", ld->name));