]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Compatiblity/FrameworkHiiToUefiHiiThunk/Utility.c
Add in FrameworkHiiToUefiHiiThunk module.
[mirror_edk2.git] / EdkCompatibilityPkg / Compatiblity / FrameworkHiiToUefiHiiThunk / Utility.c
1 /**@file
2
3 This file contains the keyboard processing code to the HII database.
4
5 Copyright (c) 2006 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16
17 #include "HiiDatabase.h"
18
19 EFI_GUID *
20 GetGuidOfFirstFormset (
21 CONST EFI_HII_FORM_PACKAGE * FormPackage
22 )
23 {
24 UINT8 *StartOfNextPackage;
25 EFI_IFR_OP_HEADER *OpCodeData;
26
27 StartOfNextPackage = (UINT8 *) FormPackage + FormPackage->Header.Length;
28 OpCodeData = (EFI_IFR_OP_HEADER *) (FormPackage + 1);
29
30 while ((UINT8 *) OpCodeData < StartOfNextPackage) {
31 if (OpCodeData->OpCode == EFI_IFR_FORM_SET_OP) {
32 return &(((EFI_IFR_FORM_SET *) OpCodeData)->Guid);
33 }
34 OpCodeData = (EFI_IFR_OP_HEADER *) ((UINT8 *) OpCodeData + OpCodeData->Length);
35 }
36
37 ASSERT (FALSE);
38
39 return NULL;
40 }
41