]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/PrintDxe/Print.c
This checkin addresses the compatibility issue of passing arguments of type VA_LIST...
[mirror_edk2.git] / MdeModulePkg / Universal / PrintDxe / Print.c
CommitLineData
610b2cbf 1/** @file\r
2 This driver produces Print2 protocol layered on top of the PrintLib from the MdePkg.\r
3\r
4Copyright (c) 2009, Intel Corporation. <BR>\r
5All rights reserved. This program and the accompanying materials\r
6are licensed and made available under the terms and conditions of the BSD License\r
7which accompanies this distribution. The full text of the license may be found at\r
8http://opensource.org/licenses/bsd-license.php\r
9\r
10THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#include <PiDxe.h>\r
16\r
17#include <Protocol/Print2.h>\r
18#include <Library/PrintLib.h>\r
19#include <Library/UefiBootServicesTableLib.h>\r
20#include <Library/DebugLib.h>\r
4f22e23b 21#include <Library/UefiDriverEntryPoint.h>\r
610b2cbf 22\r
23EFI_HANDLE mPrintThunkHandle = NULL;\r
24\r
25CONST EFI_PRINT2_PROTOCOL mPrint2Protocol = {\r
504dcb0a 26 UnicodeBSPrint,\r
610b2cbf 27 UnicodeSPrint,\r
504dcb0a 28 UnicodeBSPrintAsciiFormat,\r
610b2cbf 29 UnicodeSPrintAsciiFormat,\r
30 UnicodeValueToString,\r
504dcb0a 31 AsciiBSPrint,\r
610b2cbf 32 AsciiSPrint,\r
504dcb0a 33 AsciiBSPrintUnicodeFormat,\r
610b2cbf 34 AsciiSPrintUnicodeFormat,\r
35 AsciiValueToString\r
36};\r
37\r
610b2cbf 38/**\r
39 The user Entry Point for Print module.\r
40\r
41 This is the entry point for Print DXE Driver. It installs the Print2 Protocol.\r
42\r
43 @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
44 @param[in] SystemTable A pointer to the EFI System Table.\r
45\r
46 @retval EFI_SUCCESS The entry point is executed successfully.\r
47 @retval Others Some error occurs when executing this entry point.\r
48\r
49**/\r
50EFI_STATUS\r
51EFIAPI\r
52PrintEntryPoint (\r
53 IN EFI_HANDLE ImageHandle,\r
54 IN EFI_SYSTEM_TABLE *SystemTable\r
55 )\r
56{\r
57 EFI_STATUS Status;\r
58\r
59 Status = gBS->InstallMultipleProtocolInterfaces (\r
60 &mPrintThunkHandle,\r
61 &gEfiPrint2ProtocolGuid, &mPrint2Protocol,\r
62 NULL\r
63 );\r
64 ASSERT_EFI_ERROR (Status);\r
65\r
66 return Status;\r
67}\r