diff mbox series

efi_loader: efi_var_file: specify absolute path

Message ID 20250210131045.13905-1-caleb.connolly@linaro.org
State New
Headers show
Series efi_loader: efi_var_file: specify absolute path | expand

Commit Message

Caleb Connolly Feb. 10, 2025, 1:10 p.m. UTC
The EXT4 FS driver gets unhappy if you attempt to write a file without a
'/' prefix. Adjust the EFI_VAR_FILE_NAME string to be the full path to
the file.

Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
---
 include/efi_variable.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Heinrich Schuchardt Feb. 10, 2025, 2:04 p.m. UTC | #1
On 10.02.25 14:10, Caleb Connolly wrote:
> The EXT4 FS driver gets unhappy if you attempt to write a file without a
> '/' prefix. Adjust the EFI_VAR_FILE_NAME string to be the full path to
> the file.

Thank you for reporting the issue.

Our FS systems should all behave the same. U-Boot file paths are always
absolute. We should identify the problem in the ext4 driver.

I thought I fixed this in
4ed2b1af4599 ("fs: ext4: all file paths are absolute")

Best regards

Heinrich

>
> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> ---
>   include/efi_variable.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/efi_variable.h b/include/efi_variable.h
> index 4065cf45ecaf..83fbca93b6bd 100644
> --- a/include/efi_variable.h
> +++ b/include/efi_variable.h
> @@ -91,9 +91,9 @@ efi_status_t efi_query_variable_info_int(u32 attributes,
>   					 u64 *maximum_variable_storage_size,
>   					 u64 *remaining_variable_storage_size,
>   					 u64 *maximum_variable_size);
>
> -#define EFI_VAR_FILE_NAME "ubootefi.var"
> +#define EFI_VAR_FILE_NAME "/ubootefi.var"
>
>   #define EFI_VAR_BUF_SIZE CONFIG_EFI_VAR_BUF_SIZE
>
>   /*
diff mbox series

Patch

diff --git a/include/efi_variable.h b/include/efi_variable.h
index 4065cf45ecaf..83fbca93b6bd 100644
--- a/include/efi_variable.h
+++ b/include/efi_variable.h
@@ -91,9 +91,9 @@  efi_status_t efi_query_variable_info_int(u32 attributes,
 					 u64 *maximum_variable_storage_size,
 					 u64 *remaining_variable_storage_size,
 					 u64 *maximum_variable_size);
 
-#define EFI_VAR_FILE_NAME "ubootefi.var"
+#define EFI_VAR_FILE_NAME "/ubootefi.var"
 
 #define EFI_VAR_BUF_SIZE CONFIG_EFI_VAR_BUF_SIZE
 
 /*