[PATCH 045/112] efi: payload: init: warn if /boot FS is unknown
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jan 3 10:12:05 PST 2024
The initcall's only function is to open /boot/EFI/barebox/state.dtb
and to register it as barebox state description. If nothing is mounted
at /boot, this will fail anyway, so early exit in that case.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
efi/payload/init.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/efi/payload/init.c b/efi/payload/init.c
index 8a9080115ffd..6d65f6d53464 100644
--- a/efi/payload/init.c
+++ b/efi/payload/init.c
@@ -9,6 +9,8 @@
#define DEBUG
#endif
+#define pr_fmt(fmt) "efi-init: " fmt
+
#include <linux/linkage.h>
#include <common.h>
#include <linux/sizes.h>
@@ -395,6 +397,11 @@ static int efi_late_init(void)
if (!IS_ENABLED(CONFIG_STATE))
return 0;
+ if (!get_mounted_path("/boot")) {
+ pr_warn("boot device couldn't be determined\n");
+ return 0;
+ }
+
fdt = read_file(state_desc, &size);
if (!fdt) {
pr_info("unable to read %s: %m\n", state_desc);
--
2.39.2
More information about the barebox
mailing list