summaryrefslogtreecommitdiff
path: root/Nt32Pkg/Library
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-01 22:42:21 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-01 22:42:21 +0000
commitbe71cc9f73ecad2aed800796c33cd8fbca7aad06 (patch)
tree3ff96faf506e0b3c26aac334485f80211fee0b27 /Nt32Pkg/Library
parent1ca88083d42d1284ac7547cbed6699777c490241 (diff)
downloadedk2-be71cc9f73ecad2aed800796c33cd8fbca7aad06.zip
edk2-be71cc9f73ecad2aed800796c33cd8fbca7aad06.tar.gz
edk2-be71cc9f73ecad2aed800796c33cd8fbca7aad06.tar.bz2
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@8436 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'Nt32Pkg/Library')
-rw-r--r--Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c16
-rw-r--r--Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c b/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
index f3d9efc..97d4223 100644
--- a/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
+++ b/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
@@ -133,7 +133,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -160,7 +160,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -170,7 +170,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -184,7 +184,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
);
@@ -193,7 +193,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)),
" %p",
Data
);
@@ -201,13 +201,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
@@ -215,7 +215,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/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c b/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
index ff73c1c..56d402c 100644
--- a/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
+++ b/Nt32Pkg/Library/PeiNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c
@@ -142,7 +142,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -169,7 +169,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -179,7 +179,7 @@ OemHookStatusCodeReport (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -193,7 +193,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
);
@@ -202,7 +202,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)),
" %p",
Data
);
@@ -210,13 +210,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
@@ -224,7 +224,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,