- set_str(model, (char *) id.model, 40);
- set_str(serial, (char *) id.serial_no, 20);
- set_str(revision, (char *) id.fw_rev, 8);
+ memcpy (model, id.model, 40);
+ model[40] = '\0';
+ udev_util_encode_string(model, model_enc, sizeof(model_enc));
+ udev_util_replace_whitespace((char *) id.model, model, 40);
+ udev_util_replace_chars(model, NULL);
+ udev_util_replace_whitespace((char *) id.serial_no, serial, 20);
+ udev_util_replace_chars(serial, NULL);
+ udev_util_replace_whitespace((char *) id.fw_rev, revision, 8);
+ udev_util_replace_chars(revision, NULL);