]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseCustomDecompressLibNull/BaseCustomDecompressLibNull.c
Fix invalid return status to sync with newest UEFI spec 2.1
[mirror_edk2.git] / MdePkg / Library / BaseCustomDecompressLibNull / BaseCustomDecompressLibNull.c
CommitLineData
bf231ea6
A
1/** @file\r
2 Null implementation of the custom decompress library\r
7bc232b2 3\r
bf231ea6
A
4 Copyright (c) 2006 - 2007, Intel Corporation.<BR>\r
5 All rights reserved. This program and the accompanying materials \r
6 are licensed and made available under the terms and conditions of the BSD License \r
7 which accompanies this distribution. The full text of the license may be found at \r
8 http://opensource.org/licenses/bsd-license.php \r
7bc232b2 9\r
bf231ea6
A
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
7bc232b2 12\r
bf231ea6 13**/\r
7bc232b2 14\r
859b72fa 15#include <Base.h>\r
20bec55b 16#include <Library/DebugLib.h>\r
859b72fa
A
17#include <Library/CustomDecompressLib.h>\r
18\r
7bc232b2 19\r
bf231ea6
A
20/**
21 The internal implementation of *_DECOMPRESS_PROTOCOL.GetInfo().\r
22
23 @param[in] Source The source buffer containing the compressed data.
24 @param[in] SourceSize The size of source buffer
25 @param[out] DestinationSize The size of destination buffer.
26 @param[out] ScratchSize The size of scratch buffer.
27
28 @retval RETURN_SUCCESS The size of destination buffer and the size of scratch buffer are successull retrieved.\r
29 @retval RETURN_INVALID_PARAMETER The source data is corrupted
30
31**/\r
7bc232b2
LG
32RETURN_STATUS\r
33EFIAPI\r
34CustomDecompressGetInfo (\r
d8c79a81 35 IN CONST GUID *DecompressGuid,\r
7bc232b2
LG
36 IN CONST VOID *Source,\r
37 IN UINT32 SourceSize,\r
38 OUT UINT32 *DestinationSize,\r
39 OUT UINT32 *ScratchSize\r
40 )\r
7bc232b2
LG
41{\r
42 return RETURN_UNSUPPORTED;\r
43}\r
44\r
bf231ea6
A
45\r
46/**
47 The internal implementation of *_DECOMPRESS_PROTOCOL.Decompress().\r
48
49 @param[in] Source The source buffer containing the compressed data.
50 @param[in] Destination The destination buffer to store the decompressed data
51 @param[out] Scratch The buffer used internally by the decompress routine. This buffer is needed to store intermediate data.\r
52
53
54 @retval RETURN_SUCCESS Decompression is successfull\r
55 @retval RETURN_INVALID_PARAMETER The source data is corrupted
56
57**/\r
7bc232b2
LG
58RETURN_STATUS\r
59EFIAPI\r
60CustomDecompress (\r
d35be2a4 61 IN CONST GUID *DecompressGuid,\r
7bc232b2
LG
62 IN CONST VOID *Source,\r
63 IN OUT VOID *Destination,\r
64 IN OUT VOID *Scratch\r
65 )\r
7bc232b2
LG
66{\r
67 return RETURN_UNSUPPORTED;\r
68}\r
d8c79a81
LG
69\r
70/**
71 Get decompress method guid list.\r
72\r
73 @param[in, out] AlgorithmGuidTable The decompress method guid list.
74 @param[in, out] NumberOfAlgorithms The number of decompress methods.
75
76 @retval RETURN_SUCCESS Get all algorithmes list successfully..
77**/\r
78RETURN_STATUS\r
79EFIAPI\r
80CustomDecompressGetAlgorithms (\r
98a1fa1f
LG
81 IN OUT GUID **AlgorithmGuidTable,\r
82 IN OUT UINT32 *NumberOfAlgorithms\r
d8c79a81
LG
83 )\r
84{\r
d35be2a4
LG
85 ASSERT (NumberOfAlgorithms != NULL);\r
86\r
d8c79a81
LG
87 *NumberOfAlgorithms = 0;\r
88 return RETURN_SUCCESS; \r
89}\r