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>
This commit is contained in:

committed by
Heinrich Schuchardt

parent
f2288a26ab
commit
4cd1fca361
@@ -84,6 +84,7 @@ static int do_efi_capsule_update(struct cmd_tbl *cmdtp, int flag,
|
|||||||
return CMD_RET_SUCCESS;
|
return CMD_RET_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_EFI_CAPSULE_ON_DISK
|
||||||
static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag,
|
static int do_efi_capsule_on_disk_update(struct cmd_tbl *cmdtp, int flag,
|
||||||
int argc, char * const argv[])
|
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;
|
return ret == EFI_SUCCESS ? CMD_RET_SUCCESS : CMD_RET_FAILURE;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* do_efi_capsule_show() - show capsule information
|
* 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,
|
U_BOOT_CMD_MKENT(esrt, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_esrt,
|
||||||
"", ""),
|
"", ""),
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_EFI_CAPSULE_ON_DISK
|
||||||
U_BOOT_CMD_MKENT(disk-update, 0, 0, do_efi_capsule_on_disk_update,
|
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,
|
U_BOOT_CMD_MKENT(result, CONFIG_SYS_MAXARGS, 1, do_efi_capsule_res,
|
||||||
"", ""),
|
"", ""),
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user