]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkUnixPkg/Library/DxeUnixLib/UnixLib.c
Unix version of EFI emulator
[mirror_edk2.git] / EdkUnixPkg / Library / DxeUnixLib / UnixLib.c
diff --git a/EdkUnixPkg/Library/DxeUnixLib/UnixLib.c b/EdkUnixPkg/Library/DxeUnixLib/UnixLib.c
new file mode 100644 (file)
index 0000000..99d1550
--- /dev/null
@@ -0,0 +1,48 @@
+/*++\r
+\r
+Copyright (c) 2006, Intel Corporation                                                         \r
+All rights reserved. This program and the accompanying materials                          \r
+are licensed and made available under the terms and conditions of the BSD License         \r
+which accompanies this distribution.  The full text of the license may be found at        \r
+http://opensource.org/licenses/bsd-license.php                                            \r
+                                                                                          \r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+\r
+Module Name:\r
+\r
+  UnixLib.c\r
+\r
+Abstract:\r
+\r
+  Unix Library \r
+\r
+--*/\r
+\r
+\r
+\r
+EFI_UNIX_THUNK_PROTOCOL *gUnix;\r
+\r
+EFI_STATUS\r
+UnixLibConstructor (\r
+  IN EFI_HANDLE        ImageHandle,\r
+  IN EFI_SYSTEM_TABLE  *SystemTable\r
+  )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+Arguments:\r
+\r
+Returns:\r
+\r
+--*/\r
+{\r
+  EFI_HOB_GUID_TYPE        *GuidHob;\r
+\r
+  GuidHob = GetFirstGuidHob (&gEfiUnixThunkProtocolGuid);\r
+  ASSERT (GuidHob != NULL);\r
+  gUnix = (EFI_UNIX_THUNK_PROTOCOL *)(*(UINTN *)(GET_GUID_HOB_DATA (GuidHob)));\r
+  ASSERT (gUnix != NULL);\r
+  return EFI_SUCCESS;\r
+}\r