diff options
author | Masami Hiramatsu <masami.hiramatsu@linaro.org> | 2022-02-02 22:54:33 +0900 |
---|---|---|
committer | Sughosh Ganu <sughosh.ganu@linaro.org> | 2022-02-13 17:23:05 +0530 |
commit | 36d760750b9e21ad1da51ed42c36c9a76889a975 (patch) | |
tree | 3e0343d46ae17b53578a659398a0c26afb336459 | |
parent | 162c22bfbc4141f22937c6bc37aa02fd4621e76c (diff) |
efi_loader: use efi_update_capsule_firmware() for capsule on disk
Since the efi_update_capsule() represents the UpdateCapsule() runtime
service, it has to handle the capsule flags and update ESRT.
However, the capsule-on-disk doesn't need to care about such things.
Thus, the capsule-on-disk should use the efi_capsule_update_firmware()
directly instead of calling efi_update_capsule().
This means the roles of the efi_update_capsule() and capsule-on-disk
are different. We have to keep the efi_update_capsule() for providing
runtime service at boot time.
Suggested-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu@linaro.org>
-rw-r--r-- | lib/efi_loader/efi_capsule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c index f4519c731781..d8141176dfd7 100644 --- a/lib/efi_loader/efi_capsule.c +++ b/lib/efi_loader/efi_capsule.c @@ -1118,7 +1118,7 @@ efi_status_t efi_launch_capsules(void) index = 0; ret = efi_capsule_read_file(files[i], &capsule); if (ret == EFI_SUCCESS) { - ret = EFI_CALL(efi_update_capsule(&capsule, 1, 0)); + ret = efi_capsule_update_firmware(capsule); if (ret != EFI_SUCCESS) log_err("Applying capsule %ls failed\n", files[i]); |