X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Nt32Pkg%2FLibrary%2FDxeNt32OemHookStatusCodeLib%2FNt32OemHookStatusCodeLib.c;h=a69dc338b37b10f121e8e3d663f00717083449c2;hb=9d2eedba985bea28c8821691355d447d61f4f6ed;hp=f3d9efcaada4c0dedbf622a08f933a3f8cb62304;hpb=53d74081d074a4f114a9720b9986df68d76275a7;p=mirror_edk2.git diff --git a/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c b/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c index f3d9efcaad..a69dc338b3 100644 --- a/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c +++ b/Nt32Pkg/Library/DxeNt32OemHookStatusCodeLib/Nt32OemHookStatusCodeLib.c @@ -1,14 +1,8 @@ /** @file OEM hook status code library functions with no library constructor/destructor - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent Module Name: Nt32OemHookStatusCodeLib.c @@ -17,8 +11,6 @@ // // The package level header files this module uses // -#include -#include #include // @@ -26,6 +18,7 @@ // #include #include +#include // // The Library classes this module consumes // @@ -133,7 +126,7 @@ OemHookStatusCodeReport ( // CharCount = AsciiSPrint ( Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, + sizeof (Buffer), "\n\rASSERT!: %a (%d): %a\n\r", Filename, LineNumber, @@ -146,7 +139,7 @@ OemHookStatusCodeReport ( mWinNt->WriteFile ( mStdOut, Buffer, - CharCount, + (DWORD)CharCount, (LPDWORD)&CharCount, NULL ); @@ -160,7 +153,7 @@ OemHookStatusCodeReport ( // CharCount = AsciiBSPrint ( Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, + sizeof (Buffer), Format, Marker ); @@ -170,7 +163,7 @@ OemHookStatusCodeReport ( // CharCount = AsciiSPrint ( Buffer, - EFI_STATUS_CODE_DATA_MAX_SIZE, + sizeof (Buffer), "ERROR: C%x:V%x I%x", CodeType, Value, @@ -184,7 +177,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 +186,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 +194,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 +208,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, @@ -229,7 +222,7 @@ OemHookStatusCodeReport ( mWinNt->WriteFile ( mStdOut, Buffer, - CharCount, + (DWORD)CharCount, (LPDWORD)&CharCount, NULL );