Skip to content

Commit

Permalink
MdePkg: Add new status codes to PrintLib
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Liming Gao <[email protected]>
Cc: Zhiguang Liu <[email protected]>
Signed-off-by: Nate DeSimone <[email protected]>
  • Loading branch information
nate-desimone authored and mergify[bot] committed Aug 7, 2023
1 parent 107ddf1 commit 3c274c0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions MdePkg/Library/BasePrintLib/PrintLibInternal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
};

//
Expand Down Expand Up @@ -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
};

/**
Expand Down

0 comments on commit 3c274c0

Please sign in to comment.