]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.c
Update DebugLib to provide support for "err" command in the EFI Shell to adjust the...
[mirror_edk2.git] / MdePkg / Library / BaseDebugPrintErrorLevelLib / BaseDebugPrintErrorLevelLib.c
1 /** @file
2 Debug Print Error Level library instance that retrieves the current error
3 level from PcdDebugPrintErrorLevel. This generic library instance does not
4 support the setting of the global debug print error level mask for the platform.
5
6 Copyright (c) 2011, Intel Corporation. All rights reserved.<BR>
7 This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php.
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 **/
16
17 #include <Base.h>
18 #include <Library/DebugPrintErrorLevelLib.h>
19 #include <Library/PcdLib.h>
20
21 /**
22 Returns the debug print error level mask for the current module.
23
24 @return Debug print error level mask for the current module.
25
26 **/
27 UINT32
28 EFIAPI
29 GetDebugPrintErrorLevel (
30 VOID
31 )
32 {
33 //
34 // Retrieve the current debug print error level mask from PcdDebugPrintErrorLevel.
35 //
36 return PcdGet32 (PcdDebugPrintErrorLevel);
37 }
38
39 /**
40 Sets the global debug print error level mask fpr the entire platform.
41
42 @retval TRUE The debug print error level mask was sucessfully set.
43 @retval FALSE The debug print error level mask could not be set.
44
45 **/
46 BOOLEAN
47 EFIAPI
48 SetDebugPrintErrorLevel (
49 UINT32 ErrorLevel
50 )
51 {
52 //
53 // This library uinstance does not support setting the global debug print error
54 // level mask.
55 //
56 return FALSE;
57 }