Adding top-level Conf directory for next generation of EDK II build infrastructure...
[mirror_edk2.git] / EdkUnixPkg / Library / DxeUnixLib / UnixLib.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 UnixLib.c
15
16 Abstract:
17
18 Unix Library
19
20 --*/
21
22
23
24 EFI_UNIX_THUNK_PROTOCOL *gUnix;
25
26 EFI_STATUS
27 UnixLibConstructor (
28 IN EFI_HANDLE ImageHandle,
29 IN EFI_SYSTEM_TABLE *SystemTable
30 )
31 /*++
32
33 Routine Description:
34
35 Arguments:
36
37 Returns:
38
39 --*/
40 {
41 EFI_HOB_GUID_TYPE *GuidHob;
42
43 GuidHob = GetFirstGuidHob (&gEfiUnixThunkProtocolGuid);
44 ASSERT (GuidHob != NULL);
45 gUnix = (EFI_UNIX_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));
46 ASSERT (gUnix != NULL);
47 return EFI_SUCCESS;
48 }