Page MenuHomeFreeBSD

firmware: Fix inverted FIRMWARE_GET_NOWARN logic
ClosedPublic

Authored by guest-seuros on Jan 29 2026, 11:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Feb 28, 10:52 PM
Unknown Object (File)
Sat, Feb 28, 4:50 PM
Unknown Object (File)
Sat, Feb 21, 8:42 AM
Unknown Object (File)
Sun, Feb 15, 10:08 PM
Unknown Object (File)
Fri, Feb 13, 10:43 PM
Unknown Object (File)
Fri, Feb 13, 5:12 AM
Unknown Object (File)
Mon, Feb 9, 1:07 PM
Unknown Object (File)
Feb 5 2026, 10:04 PM
Subscribers

Details

Summary

The try_binary_file() function has inverted logic for the FIRMWARE_GET_NOWARN flag.
When the flag is set (meaning "don't warn"), the code sets warn=true and makes noise anyway.

Rename the variable to nowarn and invert the check to correctly suppress warnings when FIRMWARE_GET_NOWARN is set.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

guest-seuros held this revision as a draft.
guest-seuros edited the summary of this revision. (Show Details)
guest-seuros added a reviewer: kevans.
sys/kern/subr_firmware.c
341

I think this would read a bit better after it was still named warn and we just fixed the logic above and here; double-negatives are kind of not great

Address review feedback: keep warn variable, invert at assignment instead of double-negative

This revision was not accepted when it landed; it landed in state Needs Review.Jan 30 2026, 12:03 AM
This revision was automatically updated to reflect the committed changes.