HomeFreeBSD

cam: Fix off by one error in ASC/ASCQ lookup

Description

cam: Fix off by one error in ASC/ASCQ lookup

To implement ranges of ASC/ASCQ codes, we set SS_RANGE on an entry with
the entry being the end (highest) of the range (with the prior entry
being the start). When looking up a ASC/ASCQ code, however, we return
the second entry, which just has the range info. Instead, return the
prior entry in these cases so we can print the ASC/ASCQ code string
correctly.

Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D48685

Details

Provenance
impAuthored on Feb 4 2025, 6:29 PM
Reviewer
mav
Differential Revision
D48685: cam: Fix off by one error in ASC/ASCQ lookup
Parents
rG692e5f6ba63e: cam: Fail ASC 0x40
Branches
Unknown
Tags
Unknown