git: fdcd67be8274 - main - firmware: Fix inverted FIRMWARE_GET_NOWARN logic
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 30 Jan 2026 00:03:06 UTC
The branch main has been updated by kevans:
URL: https://cgit.FreeBSD.org/src/commit/?id=fdcd67be8274d237ae2c87d6475d9d34b440b8d8
commit fdcd67be8274d237ae2c87d6475d9d34b440b8d8
Author: Abdelkader Boudih <freebsd@seuros.com>
AuthorDate: 2026-01-30 00:02:47 +0000
Commit: Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2026-01-30 00:02:47 +0000
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
---
sys/kern/subr_firmware.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c
index d616339f2c07..88b2e71ba8df 100644
--- a/sys/kern/subr_firmware.c
+++ b/sys/kern/subr_firmware.c
@@ -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.