]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
cam: Remove trailing spaces from serial numbers too
authorWarner Losh <imp@FreeBSD.org>
Fri, 5 Nov 2021 14:56:41 +0000 (08:56 -0600)
committerWarner Losh <imp@FreeBSD.org>
Fri, 5 Nov 2021 14:56:41 +0000 (08:56 -0600)
commitbd82711aff986b66e9fae60847a79d9db938a467
tree334d8eeed0d647a6528e07cea8ea97b79a89a9f7
parent577f9aa266e3407a2de9d6bd6d836a9ba984e944
cam: Remove trailing spaces from serial numbers too

The SanDisk SD8SB8U1 and likely others pad their serial number with
spaces on the end rather than the start (at least when connected to a
SAS3008). This makes them difficult to wire unit numbers to with the
serial because you have to specify the trailing spaces. Instead, strip
out the trailing spaces.

We already strip leading spaces both here. In addition, when glabel
creates the devfs device nodes, leading and trailing spaces are removed
already (so there will be no change there either).

Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D32684
sys/cam/scsi/scsi_xpt.c