mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-27 09:12:44 +00:00
nvmecontrol: Update the test for a valid firmare revision slot
Reported by: Coverity Scan CID: 1539214 Fixes:7485926e09
nvme: Firmware revisions in the firmware slot info logpage are ASCII strings (cherry picked from commit1b38f851d8
)
This commit is contained in:
parent
4329e6ccfa
commit
661e3d4f15
@ -105,7 +105,7 @@ slot_has_valid_firmware(int fd, int slot)
|
||||
read_logpage(fd, NVME_LOG_FIRMWARE_SLOT,
|
||||
NVME_GLOBAL_NAMESPACE_TAG, 0, 0, 0, &fw, sizeof(fw));
|
||||
|
||||
if (fw.revision[slot-1] != 0LLU)
|
||||
if (fw.revision[slot-1][0] != '\0')
|
||||
has_fw = true;
|
||||
|
||||
return (has_fw);
|
||||
|
Loading…
Reference in New Issue
Block a user