summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-01 22:42:42 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-01 22:42:42 +0000
commitd94f1f35a1eb9b47fd28fb22e79aad10433616f3 (patch)
tree66b21d6e20deee072c4f3288a3eb4ade27bcbce6
parentbe71cc9f73ecad2aed800796c33cd8fbca7aad06 (diff)
downloadedk2-platforms-d94f1f35a1eb9b47fd28fb22e79aad10433616f3.tar.xz
Increase source portability by replace the use of EFI_STATUS_CODE_DATA_MAX_SIZE with sizeof(Buffer)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8437 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c16
-rw-r--r--UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c b/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
index 69d464135a..7b8c478149 100644
--- a/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
+++ b/UnixPkg/Library/DxeUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
@@ -121,7 +121,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -146,7 +146,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -156,7 +156,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -170,7 +170,7 @@ OemHookStatusCodeReport (
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %g",
CallerId
);
@@ -179,7 +179,7 @@ OemHookStatusCodeReport (
if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %x",
Data
);
@@ -187,13 +187,13 @@ OemHookStatusCodeReport (
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
"\n\r"
);
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"PROGRESS CODE: V%x I%x\n\r",
Value,
Instance
@@ -201,7 +201,7 @@ OemHookStatusCodeReport (
} else {
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"Undefined: C%x:V%x I%x\n\r",
CodeType,
Value,
diff --git a/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c b/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
index e3a918ddfd..ae5883c264 100644
--- a/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
+++ b/UnixPkg/Library/PeiUnixOemHookStatusCodeLib/UnixOemHookStatusCodeLib.c
@@ -129,7 +129,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -154,7 +154,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -164,7 +164,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -178,7 +178,7 @@ OemHookStatusCodeReport (
if (CallerId != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %g",
CallerId
);
@@ -187,7 +187,7 @@ OemHookStatusCodeReport (
if (Data != NULL) {
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
" %x",
Data
);
@@ -195,13 +195,13 @@ OemHookStatusCodeReport (
CharCount += AsciiSPrint (
&Buffer[CharCount - 1],
- (EFI_STATUS_CODE_DATA_MAX_SIZE - (sizeof (Buffer[0]) * CharCount)),
+ (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),
"\n\r"
);
} else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"PROGRESS CODE: V%x I%x\n\r",
Value,
Instance
@@ -209,7 +209,7 @@ OemHookStatusCodeReport (
} else {
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"Undefined: C%x:V%x I%x\n\r",
CodeType,
Value,