summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-01 22:41:57 +0000
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2009-06-01 22:41:57 +0000
commit1ca88083d42d1284ac7547cbed6699777c490241 (patch)
tree6ef50f473771556338e791dcc4b91a222220dac4 /IntelFrameworkModulePkg/Universal
parentb088ba369e11932d964f3ece1efc63c0019c6c2d (diff)
downloadedk2-platforms-1ca88083d42d1284ac7547cbed6699777c490241.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@8435 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Universal')
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c16
-rw-r--r--IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
index 00aa41cb21..1b409310cf 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/Pei/SerialStatusCodeWorker.c
@@ -62,7 +62,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rPEI_ASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -75,7 +75,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -85,7 +85,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -95,7 +95,7 @@ SerialStatusCodeReportWorker (
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
);
@@ -104,7 +104,7 @@ SerialStatusCodeReportWorker (
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
);
@@ -112,7 +112,7 @@ SerialStatusCodeReportWorker (
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) {
@@ -121,7 +121,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"PROGRESS CODE: V%x I%x\n\r",
Value,
Instance
@@ -132,7 +132,7 @@ SerialStatusCodeReportWorker (
//
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/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
index cf5d48d665..1d5f53e479 100644
--- a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
+++ b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
@@ -96,7 +96,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"\n\rDXE_ASSERT!: %a (%d): %a\n\r",
Filename,
LineNumber,
@@ -109,7 +109,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiBSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
Format,
Marker
);
@@ -119,7 +119,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"ERROR: C%x:V%x I%x",
CodeType,
Value,
@@ -129,7 +129,7 @@ SerialStatusCodeReportWorker (
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
);
@@ -138,7 +138,7 @@ SerialStatusCodeReportWorker (
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
);
@@ -146,7 +146,7 @@ SerialStatusCodeReportWorker (
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) {
@@ -155,7 +155,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"PROGRESS CODE: V%x I%x\n\r",
Value,
Instance
@@ -166,7 +166,7 @@ SerialStatusCodeReportWorker (
//
CharCount = AsciiSPrint (
Buffer,
- EFI_STATUS_CODE_DATA_MAX_SIZE,
+ sizeof (Buffer),
"Undefined: C%x:V%x I%x\n\r",
CodeType,
Value,