summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorMasami Hiramatsu <masami.hiramatsu@linaro.org>2022-03-21 22:37:35 +0900
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-04-09 21:06:31 +0200
commit4cd1fca3611b40d84d38dec9f562ecfd287e2844 (patch)
treee38c1581b2f9c253a59a6286122eaede2c3c87b6 /cmd
parentf2288a26ab6d7d23bf4e57a61e051d0e0cfdf8dd (diff)
cmd: efidebug: Disable 'capsule disk-update' when CONFIG_EFI_CAPSULE_ON_DISK=n
Disable 'capsule disk-update' option for the efidebug command when CONFIC_EFI_CAPSULE_ON_DISK is disabled, because this option is available only when the EFI capsule update on disk is enabled. Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'cmd')
-rw-r--r--cmd/efidebug.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd/efidebug.c b/cmd/efidebug.c
index 3cc6f2bfcc..df928ce71d 100644
--- a/cmd/efidebug.c
+++ b/cmd/efidebug.c
@@ -84,6 +84,7 @@ static int do_efi_capsule_update(struct cmd_tbl *cmdtp, int flag,
return CMD_RET_SUCCESS;
}
+#ifdef CONFIG_EFI_CAPSULE_ON_DISK
static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag,
int argc, char * const argv[])
{
@@ -93,6 +94,7 @@ static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag,
return ret == EFI_SUCCESS ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
}
+#endif
/**
* do_efi_capsule_show() - show capsule information
@@ -303,8 +305,10 @@ static struct cmd_tbl cmd_efidebug_capsule_sub[] = {
U_BOOT_CMD_MKENT(esrt, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_esrt,
"", ""),
#endif
+#ifdef CONFIG_EFI_CAPSULE_ON_DISK
U_BOOT_CMD_MKENT(disk-update, 0, 0, do_efi_capsule_on_disk_update,
"", ""),
+#endif
U_BOOT_CMD_MKENT(result, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_res,
"", ""),
};