|
|
fd0330 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
fd0330 |
From: Lu Ken <ken.lu@intel.com>
|
|
|
fd0330 |
Date: Wed, 13 Jul 2022 10:06:10 +0800
|
|
|
fd0330 |
Subject: [PATCH] commands/efi/tpm: Refine the status of log event
|
|
|
fd0330 |
|
|
|
fd0330 |
1. Use macro GRUB_ERR_NONE instead of hard code 0.
|
|
|
fd0330 |
2. Keep lowercase of the first char for the status string of log event.
|
|
|
fd0330 |
|
|
|
fd0330 |
Signed-off-by: Lu Ken <ken.lu@intel.com>
|
|
|
fd0330 |
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
|
fd0330 |
(cherry picked from commit 922898573e37135f5dedc16f3e15a1d1d4c53f8a)
|
|
|
fd0330 |
---
|
|
|
fd0330 |
grub-core/commands/efi/tpm.c | 10 +++++-----
|
|
|
fd0330 |
1 file changed, 5 insertions(+), 5 deletions(-)
|
|
|
fd0330 |
|
|
|
fd0330 |
diff --git a/grub-core/commands/efi/tpm.c b/grub-core/commands/efi/tpm.c
|
|
|
fd0330 |
index a97d85368a..7acf510499 100644
|
|
|
fd0330 |
--- a/grub-core/commands/efi/tpm.c
|
|
|
fd0330 |
+++ b/grub-core/commands/efi/tpm.c
|
|
|
fd0330 |
@@ -135,17 +135,17 @@ grub_efi_log_event_status (grub_efi_status_t status)
|
|
|
fd0330 |
switch (status)
|
|
|
fd0330 |
{
|
|
|
fd0330 |
case GRUB_EFI_SUCCESS:
|
|
|
fd0330 |
- return 0;
|
|
|
fd0330 |
+ return GRUB_ERR_NONE;
|
|
|
fd0330 |
case GRUB_EFI_DEVICE_ERROR:
|
|
|
fd0330 |
- return grub_error (GRUB_ERR_IO, N_("Command failed"));
|
|
|
fd0330 |
+ return grub_error (GRUB_ERR_IO, N_("command failed"));
|
|
|
fd0330 |
case GRUB_EFI_INVALID_PARAMETER:
|
|
|
fd0330 |
- return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("Invalid parameter"));
|
|
|
fd0330 |
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("invalid parameter"));
|
|
|
fd0330 |
case GRUB_EFI_BUFFER_TOO_SMALL:
|
|
|
fd0330 |
- return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("Output buffer too small"));
|
|
|
fd0330 |
+ return grub_error (GRUB_ERR_BAD_ARGUMENT, N_("output buffer too small"));
|
|
|
fd0330 |
case GRUB_EFI_NOT_FOUND:
|
|
|
fd0330 |
return grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("TPM unavailable"));
|
|
|
fd0330 |
default:
|
|
|
fd0330 |
- return grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("Unknown TPM error"));
|
|
|
fd0330 |
+ return grub_error (GRUB_ERR_UNKNOWN_DEVICE, N_("unknown TPM error"));
|
|
|
fd0330 |
}
|
|
|
fd0330 |
}
|
|
|
fd0330 |
|