firmware: Fix inverted FIRMWARE_GET_NOWARN logic

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.

Invert the assignment to warn to correctly suppress warnings when
FIRMWARE_GET_NOWARN is set.

Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D54955
This commit is contained in:
Abdelkader Boudih
2026-01-29 18:02:47 -06:00
committed by Kyle Evans
parent b249cb2b18
commit fdcd67be82
+1 -1
View File
@@ -281,7 +281,7 @@ try_binary_file(const char *imagename, uint32_t flags)
int oflags;
size_t resid;
int error;
bool warn = flags & FIRMWARE_GET_NOWARN;
bool warn = (flags & FIRMWARE_GET_NOWARN) == 0;
/*
* XXX TODO: Loop over some path instead of a single element path.