[PATCH v2 045/113] efi: payload: init: warn if /boot FS is unknown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 efi/payload/init.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/efi/payload/init.c b/efi/payload/init.c
index 5f2cb085da90..592cf662d540 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>
@@ -396,6 +398,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





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux