HomeFreeBSD

cam: Remove trailing spaces from serial numbers too

Description

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

Details

Provenance
impAuthored on Nov 5 2021, 2:56 PM
Differential Revision
D32684: cam: Remove trailing spaces from serial numbers too
Parents
rG577f9aa266e3: cam_periph: Add ability to wire units to a serial number
Branches
Unknown
Tags
Unknown