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)
Wed, Apr 1, 7:35 PM
Unknown Object (File)
Wed, Mar 25, 9:24 AM
Unknown Object (File)
Wed, Mar 25, 7:37 AM
Unknown Object (File)
Wed, Mar 25, 7:14 AM
Unknown Object (File)
Sun, Mar 22, 4:19 AM
Unknown Object (File)
Fri, Mar 20, 3:43 AM
Unknown Object (File)
Fri, Mar 20, 3:43 AM
Unknown Object (File)
Tue, Mar 17, 4:20 AM
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.