mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
efi/capsule-loader: Don't output reset log when reset flags are not set
When reset flags in capsule header are not set, it means firmware attempts to immediately process or launch the capsule. Moreover, reset is not needed in this case. The current code will output log to indicate reset. This patch adds a branch to avoid reset log output when the flags are not set. [ardb: use braces in multi-line 'if', clarify comment and commit log] Signed-off-by: Shunyong Yang <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Cc: Joey Zheng <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Matt Fleming <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
1de3a1be8a
commit
83f0a7c7b2
1 changed files with 10 additions and 4 deletions
|
|
@ -134,10 +134,16 @@ static ssize_t efi_capsule_submit_update(struct capsule_info *cap_info)
|
|||
|
||||
/* Indicate capsule binary uploading is done */
|
||||
cap_info->index = NO_FURTHER_WRITE_ACTION;
|
||||
pr_info("Successfully upload capsule file with reboot type '%s'\n",
|
||||
!cap_info->reset_type ? "RESET_COLD" :
|
||||
cap_info->reset_type == 1 ? "RESET_WARM" :
|
||||
"RESET_SHUTDOWN");
|
||||
|
||||
if (cap_info->header.flags & EFI_CAPSULE_PERSIST_ACROSS_RESET) {
|
||||
pr_info("Successfully uploaded capsule file with reboot type '%s'\n",
|
||||
!cap_info->reset_type ? "RESET_COLD" :
|
||||
cap_info->reset_type == 1 ? "RESET_WARM" :
|
||||
"RESET_SHUTDOWN");
|
||||
} else {
|
||||
pr_info("Successfully processed capsule file\n");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue