Page MenuHomeFreeBSD

D49825.diff
No OneTemporary

D49825.diff

diff --git a/sys/kern/subr_firmware.c b/sys/kern/subr_firmware.c
--- a/sys/kern/subr_firmware.c
+++ b/sys/kern/subr_firmware.c
@@ -266,7 +266,7 @@
static const char *fw_path = "/boot/firmware/";
-static void
+static bool
try_binary_file(const char *imagename, uint32_t flags)
{
struct nameidata nd;
@@ -331,7 +331,7 @@
if (bootverbose)
printf("%s: Loaded binary firmware using %s\n", imagename, fn);
sbuf_delete(sb);
- return;
+ return (true);
err2: /* cleanup in vn_open through vn_close */
VOP_UNLOCK(nd.ni_vp);
@@ -339,8 +339,10 @@
err:
free(data, M_FIRMWARE);
if (bootverbose || warn)
- printf("%s: could not load binary firmware %s either\n", imagename, fn);
+ printf("%s: could not load binary firmware %s from file\n", imagename, fn);
sbuf_delete(sb);
+
+ return (false);
}
static void
@@ -353,10 +355,14 @@
error = linker_reference_module(fwli->imagename, NULL, &result);
if (error != 0) {
- if (bootverbose || (fwli->flags & FIRMWARE_GET_NOWARN) == 0)
+ if (bootverbose)
+ printf("%s: could not load firmware module, error %d\n",
+ fwli->imagename, error);
+
+ if (!try_binary_file(fwli->imagename, fwli->flags))
printf("%s: could not load firmware image, error %d\n",
fwli->imagename, error);
- try_binary_file(fwli->imagename, fwli->flags);
+
mtx_lock(&firmware_mtx);
goto done;
}

File Metadata

Mime Type
text/plain
Expires
Tue, Apr 29, 6:30 AM (16 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17548445
Default Alt Text
D49825.diff (1 KB)

Event Timeline