]> git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Universal/FirmwareVolume/GuidedSectionExtraction/Crc32SectionExtract/Dxe/GuidedSection.c
Fix capitalization issues.
[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
35 EFI_STATUS
36 GuidedSectionExtractionProtocolConstructor (
37 OUT EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL **GuidedSep,
38 IN EFI_EXTRACT_GUIDED_SECTION ExtractSection
39 )
40 /*++
41
42 Routine Description:
43
44 Constructor for the GUIDed section extraction protocol. Initializes
45 instance data.
46
47 Arguments:
48
49 This Instance to construct
50
51 Returns:
52
53 EFI_SUCCESS: Instance initialized.
54
55 --*/
56 // TODO: GuidedSep - add argument and description to function comment
57 // TODO: ExtractSection - add argument and description to function comment
58 // TODO: EFI_OUT_OF_RESOURCES - add return value to function comment
59 {
60 EFI_STATUS Status;
61
62 *GuidedSep = NULL;
63 Status = gBS->AllocatePool (
64 EfiBootServicesData,
65 sizeof (EFI_GUIDED_SECTION_EXTRACTION_PROTOCOL),
66 (VOID **) GuidedSep
67 );
68 if (EFI_ERROR (Status)) {
69 return EFI_OUT_OF_RESOURCES;
70 }
71
72 (*GuidedSep)->ExtractSection = ExtractSection;
73
74 return EFI_SUCCESS;
75 }