]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c
Further check-in to smooth Intel IPF compiler building.
[mirror_edk2.git] / EdkModulePkg / Universal / FirmwareVolume / GuidedSectionExtraction / Crc32SectionExtract / Dxe / GuidedSection.c
1 /*++
2
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
8
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
12 Module Name:
13
14 GuidedSection.c
15
16 Abstract:
17
18 GUIDed section extraction protocol implementation.
19 This contains the common constructor of GUIDed section
20 extraction protocol. GUID specific implementation of each
21 GUIDed section extraction protocol can be found in other
22 files under the same directory.
23
24 Please refer to the Tiano File Image Format Specification,
25 FV spec 0.3.6
26
27 Acronyms used Meaning
28
29
30 --*/
31
32
33 #include "Common/FirmwareFileSystem.h"
34 #include "GuidedSection.h"
35
36 EFI_STATUS
37 GuidedSectionExtractionProtocolConstructor (
38 OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
39 IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
40 )
41 /*++
42
43 Routine Description:
44
45 Constructor for the GUIDed section extraction protocol. Initializes
46 instance data.
47
48 Arguments:
49
50 This Instance to construct
51
52 Returns:
53
54 EFI_SUCCESS: Instance initialized.
55
56 --*/
57 // TODO: GuidedSep - add argument and description to function comment
58 // TODO: ExtractSection - add argument and description to function comment
59 // TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
60 {
61 EFI_STATUS Status;
62
63 *GuidedSep = NULL;
64 Status = gBS->AllocatePool (
65 EfiBootServicesData,
66 sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL),
67 (VOID **) GuidedSep
68 );
69 if (EFI_ERROR (Status)) {
70 return EFI_OUT_OF_RESOURCES;
71 }
72
73 (*GuidedSep)->ExtractSection = ExtractSection;
74
75 return EFI_SUCCESS;
76 }