diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-20 07:57:17 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-20 07:57:17 +0100 |
commit | 1340a9e9ec72bde2eac873167920739883ada650 (patch) | |
tree | de75d9ebef39e8c397d1836f8526dc90963cbce3 | |
parent | 97f37a7e784d11e3aabdc676b5af90d3bc1a1793 (diff) |
scsi_id: make sure, we do not have slashes in values
-rw-r--r-- | extras/scsi_id/scsi_id.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/extras/scsi_id/scsi_id.c b/extras/scsi_id/scsi_id.c index 69994dd9d3..943cbb21ca 100644 --- a/extras/scsi_id/scsi_id.c +++ b/extras/scsi_id/scsi_id.c @@ -502,9 +502,12 @@ static int set_inq_values(struct udev *udev, struct scsi_id_device *dev_scsi, co return retval; udev_util_replace_whitespace(dev_scsi->vendor, vendor_str, sizeof(vendor_str)); + udev_util_replace_chars(vendor_str, NULL); udev_util_replace_whitespace(dev_scsi->model, model_str, sizeof(model_str)); + udev_util_replace_chars(model_str, NULL); set_type(dev_scsi->type, type_str, sizeof(type_str)); udev_util_replace_whitespace(dev_scsi->revision, revision_str, sizeof(revision_str)); + udev_util_replace_chars(revision_str, NULL); return 0; } @@ -572,8 +575,10 @@ static int scsi_id(struct udev *udev, char *maj_min_dev) printf("ID_MODEL=%s\n", model_str); printf("ID_REVISION=%s\n", revision_str); udev_util_replace_whitespace(dev_scsi.serial, serial_str, sizeof(serial_str)); + udev_util_replace_chars(serial_str, NULL); printf("ID_SERIAL=%s\n", serial_str); udev_util_replace_whitespace(serial_short, serial_str, sizeof(serial_str)); + udev_util_replace_chars(serial_str, NULL); printf("ID_SERIAL_SHORT=%s\n", serial_str); printf("ID_TYPE=%s\n", type_str); } else { |