Date: Mon, 9 May 2022 14:30:19 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 356155fe0237 - main - Fix bd82711aff98 serial number trailing spaces removal. Message-ID: <202205091430.249EUJ8U087487@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=356155fe02379b8bae1dc613d4df375f542236a1 commit 356155fe02379b8bae1dc613d4df375f542236a1 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2022-05-09 14:23:23 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2022-05-09 14:30:04 +0000 Fix bd82711aff98 serial number trailing spaces removal. For devices returning 16 byte serial numbers with 8 leading spaces this falsely removed everything due to looking at wrong offset. --- sys/cam/scsi/scsi_xpt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/scsi/scsi_xpt.c b/sys/cam/scsi/scsi_xpt.c index 77c47d578ae3..8c83ce08d635 100644 --- a/sys/cam/scsi/scsi_xpt.c +++ b/sys/cam/scsi/scsi_xpt.c @@ -1621,7 +1621,7 @@ probe_device_check: * trailing spaces. Remove them. */ while (slen > 0 && - serial_buf->serial_num[slen - 1] == ' ') + serial_buf->serial_num[start + slen - 1] == ' ') slen--; memcpy(path->device->serial_num, &serial_buf->serial_num[start], slen);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202205091430.249EUJ8U087487>