]> err.no Git - systemd/commitdiff
scsi_id: fix truncated model in by-id device links
authorJean Delvare <jdelvare@suse.de>
Fri, 25 May 2012 14:08:00 +0000 (16:08 +0200)
committerKay Sievers <kay@vrfy.org>
Sun, 27 May 2012 13:15:47 +0000 (15:15 +0200)
Do not forget the leading "S" when appending the serial number,
otherwise we chop the last character of the model name.

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=763397
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Petr Uzel <petr.uzel@suse.cz>
src/udev/scsi_id/scsi_serial.c

index 8440b4cb4c6829c3bd84a0e1a1a2201e2d640663..5ad0c3135e0597ba12e41a49dc14f371d44a9723 100644 (file)
@@ -799,6 +799,7 @@ static int do_scsi_page80_inquiry(struct udev *udev,
                 ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
                 if (ser_ind < 0)
                         return 1;
+                ser_ind++;     /* for the leading 'S' */
                 for (i = 4; i < len + 4; i++, ser_ind++)
                         serial[ser_ind] = buf[i];
         }