diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-28 02:27:23 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-28 02:27:23 +0200 |
commit | a8916c3400e2968aa17b296deff8736db86c338a (patch) | |
tree | d0add1870d2543fe8a6eb4a9113549438889293a /extras/scsi_id/scsi_serial.c | |
parent | b25a94549ce37cd7654f6f44b66944375919db58 (diff) |
scsi_id: --reformat_serial - use udev_util_replace_whitespace()
Diffstat (limited to 'extras/scsi_id/scsi_serial.c')
-rw-r--r-- | extras/scsi_id/scsi_serial.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/extras/scsi_id/scsi_serial.c b/extras/scsi_id/scsi_serial.c index c47712d859..68bed08241 100644 --- a/extras/scsi_id/scsi_serial.c +++ b/extras/scsi_id/scsi_serial.c @@ -457,11 +457,8 @@ static int prepend_vendor_model(struct udev *udev, int ind; strncpy(serial, dev_scsi->vendor, VENDOR_LENGTH); - ind = strlen(serial) - 1; - strncat(serial, dev_scsi->model, MODEL_LENGTH); - ind = strlen(serial) - 1; - ind++; + ind = strlen(serial); /* * This is not a complete check, since we are using strncat/cpy @@ -773,7 +770,7 @@ static int do_scsi_page80_inquiry(struct udev *udev, len = 1 + VENDOR_LENGTH + MODEL_LENGTH + buf[3]; if (max_len < len) { info(udev, "%s: length %d too short - need %d\n", - dev_scsi->kernel, max_len, len); + dev_scsi->kernel, max_len, len); return 1; } /* |