From 3c274c0d83d5464b336e40058bc5969bfef25f7b Mon Sep 17 00:00:00 2001 From: Nate DeSimone Date: Fri, 28 Jul 2023 15:55:58 -0700 Subject: [PATCH] MdePkg: Add new status codes to PrintLib PrintLib does not correctly decode the follow status codes: 1. EFI_IP_ADDRESS_CONFLICT 2. EFI_HTTP_ERROR 3. EFI_WARN_FILE_SYSTEM 4. EFI_WARN_RESET_REQUIRED These missing status codes have been added. Reviewed-by: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Nate DeSimone --- MdePkg/Library/BasePrintLib/PrintLibInternal.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.c b/MdePkg/Library/BasePrintLib/PrintLibInternal.c index 42b598a432..c666c6614c 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.c +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.c @@ -8,8 +8,8 @@ #include "PrintLibInternal.h" -#define WARNING_STATUS_NUMBER 5 -#define ERROR_STATUS_NUMBER 33 +#define WARNING_STATUS_NUMBER 7 +#define ERROR_STATUS_NUMBER 35 // // Safe print checks @@ -37,6 +37,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mWarningString[][24+1] = { "Warning Write Failure", // RETURN_WARN_WRITE_FAILURE = 3 "Warning Buffer Too Small", // RETURN_WARN_BUFFER_TOO_SMALL = 4 "Warning Stale Data", // RETURN_WARN_STALE_DATA = 5 + "Warning File System", // RETURN_WARN_FILE_SYSTEM = 6 + "Warning Reset Required", // RETURN_WARN_RESET_REQUIRED = 7 }; // @@ -75,7 +77,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mErrorString[][20+1] = { "Reserved (30)", // RESERVED = 30 | MAX_BIT "End of File", // RETURN_END_OF_FILE = 31 | MAX_BIT "Invalid Language", // RETURN_INVALID_LANGUAGE = 32 | MAX_BIT - "Compromised Data" // RETURN_COMPROMISED_DATA = 33 | MAX_BIT + "Compromised Data", // RETURN_COMPROMISED_DATA = 33 | MAX_BIT + "IP Address Conflict", // RETURN_IP_ADDRESS_CONFLICT = 34 | MAX_BIT + "HTTP Error" // RETURN_HTTP_ERROR = 35 | MAX_BIT }; /**