diff options
author | Nick Child <nnac123@gmail.com> | 2021-04-14 19:40:33 -0400 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-05-13 14:47:33 +0530 |
commit | ec884c19bfff75bc5b59093113f170837be28ec9 (patch) | |
tree | 230daabb5d9248d0be362c6d4ebd842b33b44f50 /libstb | |
parent | d505f4037976ac540be1608653272ee57ae737ee (diff) | |
download | skiboot-ec884c19bfff75bc5b59093113f170837be28ec9.zip skiboot-ec884c19bfff75bc5b59093113f170837be28ec9.tar.gz skiboot-ec884c19bfff75bc5b59093113f170837be28ec9.tar.bz2 |
edk2-compat-process.c: Remove repetitive debug print statements
Functions `get_esl_cert`, `validate_esl_list` and
`get_esl_signature_list_size` all contain the same debug print
statement. This statement prints the size of the ESL.
`validate_esl_list` calls `get_esl_cert` so the same debug information
prints twice when validating the newly submitted ESL. Additionally,
the same debug prints twice when validating the current ESL since
`get_esl_cert` and `get_esl_signature_list_size` are both called by
the function `verify_signature`. Since `get_esl_cert` is the common
factor, this commit removes the other two print statements (and adds
some information to an error message to maintain clarity, in case
`validate_esl_list` fails before calling `validate_esl_cert`). After
double checking that these functions are not being called anywhere
else, the only real change is to reduce the number of redundant print
statements for the secvar update process.
Signed-off-by: Nick Child <nick.child@ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'libstb')
-rw-r--r-- | libstb/secvar/backend/edk2-compat-process.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/libstb/secvar/backend/edk2-compat-process.c b/libstb/secvar/backend/edk2-compat-process.c index dfaec13..244f234 100644 --- a/libstb/secvar/backend/edk2-compat-process.c +++ b/libstb/secvar/backend/edk2-compat-process.c @@ -105,9 +105,6 @@ static int32_t get_esl_signature_list_size(const char *buf, const size_t buflen) if (!list) return OPAL_PARAMETER; - prlog(PR_DEBUG, "size of signature list size is %u\n", - le32_to_cpu(list->SignatureListSize)); - return le32_to_cpu(list->SignatureListSize); } @@ -275,15 +272,13 @@ int validate_esl_list(const char *key, const char *esl, const size_t size) if (!list) return OPAL_PARAMETER; - prlog(PR_DEBUG, "size of signature list size is %u\n", - le32_to_cpu(list->SignatureListSize)); - /* Calculate the size of the ESL */ eslsize = le32_to_cpu(list->SignatureListSize); /* If could not extract the size */ if (eslsize <= 0) { - prlog(PR_ERR, "Invalid size of the ESL\n"); + prlog(PR_ERR, "Invalid size of the ESL: %u\n", + le32_to_cpu(list->SignatureListSize)); rc = OPAL_PARAMETER; break; } |