[U-Boot] [PATCH v2 13/14] cmd: efishell: export uefi variable helper functions

AKASHI Takahiro takahiro.akashi at linaro.org
Mon Nov 5 09:06:52 UTC 2018


Those function will be used for integration with 'env' command
so as to handle uefi variables.

Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
---
 cmd/efishell.c    | 4 ++--
 include/command.h | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmd/efishell.c b/cmd/efishell.c
index bd2b99e74079..8122b842dd76 100644
--- a/cmd/efishell.c
+++ b/cmd/efishell.c
@@ -68,7 +68,7 @@ static void dump_var_data(char *data, unsigned long len)
  *
  *   efi_$guid_$varname = {attributes}(type)value
  */
-static int do_efi_dump_var(int argc, char * const argv[])
+int do_efi_dump_var(int argc, char * const argv[])
 {
 	char regex[256];
 	char * const regexlist[] = {regex};
@@ -228,7 +228,7 @@ out:
 	return 0;
 }
 
-static int do_efi_set_var(int argc, char * const argv[])
+int do_efi_set_var(int argc, char * const argv[])
 {
 	char *var_name, *value = NULL;
 	unsigned long size = 0;
diff --git a/include/command.h b/include/command.h
index 5bb675122cce..2ce8b53f74c8 100644
--- a/include/command.h
+++ b/include/command.h
@@ -50,6 +50,8 @@ extern int do_run(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 #endif
 #if defined(CONFIG_CMD_BOOTEFI)
 int do_bootefi_bootmgr_exec(int boot_id);
+int do_efi_dump_var(int argc, char * const argv[]);
+int do_efi_set_var(int argc, char * const argv[]);
 #endif
 
 /* common/command.c */
-- 
2.19.0



More information about the U-Boot mailing list