]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/Sec/Gasket.c
UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg)
[mirror_edk2.git] / UnixPkg / Sec / Gasket.c
diff --git a/UnixPkg/Sec/Gasket.c b/UnixPkg/Sec/Gasket.c
deleted file mode 100644 (file)
index 04c65f1..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-/** @file\r
-\r
-  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
-  \r
-  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
-**/\r
-\r
-#ifdef __APPLE__\r
-\r
-#include "SecMain.h"\r
-#include "Gasket.h"\r
-\r
-//\r
-// Gasket functions for EFI_UNIX_THUNK_PROTOCOL\r
-//\r
-\r
-void \r
-GasketmsSleep (unsigned long Milliseconds)\r
-{ \r
-  GasketUintn (msSleep, Milliseconds);\r
-  return;\r
-}\r
-\r
-void \r
-Gasketexit (int status)\r
-{\r
- GasketUintn (exit, status);\r
-  return;\r
-}\r
-\r
-\r
-void \r
-GasketSetTimer (UINT64 PeriodMs, VOID (*CallBack)(UINT64 DeltaMs))\r
-{\r
- GasketUint64Uintn (SetTimer, PeriodMs, (UINTN)CallBack);\r
-  return;\r
-}\r
-\r
-\r
-void \r
-GasketGetLocalTime (EFI_TIME *Time)\r
-{\r
-  GasketUintn (GetLocalTime, (UINTN)Time);\r
-  return;\r
-}\r
-\r
-\r
-struct tm *\r
-Gasketgmtime (const time_t *clock)\r
-{\r
-  return (struct tm *)(UINTN)GasketUintn (localtime, (UINTN)clock);\r
-}\r
-\r
-\r
-long \r
-GasketGetTimeZone (void)\r
-{\r
-  return  GasketVoid (GetTimeZone);\r
-}\r
-\r
-\r
-int \r
-GasketGetDayLight (void)\r
-{\r
-  return  GasketVoid (GetDayLight);\r
-}\r
-\r
-\r
-int \r
-Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout)\r
-{\r
-  return GasketUintnUintnUintn (poll, (UINTN)pfd, nfds, timeout);\r
-}\r
-\r
-\r
-long\r
-Gasketread (int fd, void *buf, int count)\r
-{\r
-  return  GasketUintnUintnUintn (read, fd, (UINTN)buf, count);\r
-}\r
-\r
-\r
-long\r
-Gasketwrite (int fd, const void *buf, int count)\r
-{\r
-  return  GasketUintnUintnUintn (write, fd, (UINTN)buf, count);\r
-}\r
-\r
-\r
-char *\r
-Gasketgetenv (const char *name)\r
-{\r
-  return (char *)(UINTN)GasketUintn (getenv, (UINTN)name);\r
-}\r
-\r
-\r
-int \r
-Gasketopen (const char *name, int flags, int mode)\r
-{\r
-  return  GasketUintnUintnUintn (open, (UINTN)name, flags, mode);\r
-}\r
-\r
-\r
-off_t \r
-Gasketlseek (int fd, off_t off, int whence)\r
-{\r
-  if (sizeof off == 8) {\r
-    return GasketUintnUint64Uintn (lseek, fd, off, whence);\r
-  } else if (sizeof off == 4) {\r
-    return GasketUintnUintnUintn (lseek, fd, off, whence);\r
-  }\r
-}\r
-\r
-\r
-int \r
-Gasketftruncate (int fd, long int len)\r
-{\r
-  return GasketUintnUintn (ftruncate, fd, len);\r
-}\r
-\r
-\r
-int \r
-Gasketclose (int fd)\r
-{\r
-  return GasketUintn (close, fd);\r
-}\r
-\r
-\r
-int \r
-Gasketmkdir (const char *pathname, mode_t mode)\r
-{\r
-  return GasketUintnUint16 (mkdir, (UINTN)pathname, mode);\r
-}\r
-\r
-\r
-int \r
-Gasketrmdir (const char *pathname)\r
-{\r
-  return GasketUintn (rmdir, (UINTN)pathname);\r
-}\r
-\r
-\r
-int \r
-Gasketunlink (const char *pathname)\r
-{\r
-  return GasketUintn (unlink, (UINTN)pathname);\r
-}\r
-\r
-\r
-int \r
-GasketGetErrno (void)\r
-{\r
-  return  GasketVoid (GetErrno);\r
-}\r
-\r
-\r
-DIR *\r
-Gasketopendir (const char *pathname)\r
-{\r
-  return (DIR *)(UINTN)GasketUintn (opendir, (UINTN)pathname);\r
-}\r
-\r
-\r
-void \r
-Gasketrewinddir (DIR *dir)\r
-{\r
-  GasketUintn (rewinddir, (UINTN)dir);\r
-  return;\r
-}\r
-\r
-\r
-struct dirent *\r
-Gasketreaddir (DIR *dir)\r
-{\r
-  return (struct dirent *)(UINTN)GasketUintn (readdir, (UINTN)dir);\r
-}\r
-\r
-\r
-int \r
-Gasketclosedir (DIR *dir)\r
-{\r
-  return GasketUintn (closedir,  (UINTN)dir);\r
-}\r
-\r
-\r
-int \r
-Gasketstat (const char *path, STAT_FIX *buf)\r
-{\r
-  return GasketUintnUintn (stat, (UINTN)path, (UINTN)buf);\r
-}\r
-\r
-\r
-int \r
-Gasketstatfs (const char *path, struct statfs *buf)\r
-{\r
-  return GasketUintnUintn (statfs, (UINTN)path, (UINTN)buf);\r
-}\r
-\r
-\r
-int \r
-Gasketrename (const char *oldpath, const char *newpath)\r
-{\r
-  return GasketUintnUintn (rename, (UINTN)oldpath, (UINTN)newpath);\r
-}\r
-\r
-\r
-time_t \r
-Gasketmktime (struct tm *tm)\r
-{\r
-  return GasketUintn (mktime, (UINTN)tm);\r
-}\r
-\r
-\r
-int \r
-Gasketfsync (int fd)\r
-{\r
-  return GasketUintn (fsync, fd);\r
-}\r
-\r
-\r
-int \r
-Gasketchmod (const char *path, mode_t mode)\r
-{\r
-  return GasketUintnUint16 (chmod, (UINTN)path, mode);\r
-}\r
-\r
-\r
-int \r
-Gasketutime (const char *filename, const struct utimbuf *buf)\r
-{\r
-  return GasketUintnUintn (utime, (UINTN)filename, (UINTN)buf);\r
-}\r
-\r
-\r
-int \r
-Gaskettcflush (int fildes, int queue_selector)\r
-{\r
-  return GasketUintnUintn (tcflush, fildes, queue_selector);\r
-}\r
-\r
-\r
-EFI_STATUS \r
-GasketUgaCreate (struct _EFI_UNIX_UGA_IO_PROTOCOL **UgaIo, CONST CHAR16 *Title)\r
-{\r
-  return GasketUintnUintn (UgaCreate, (UINTN)UgaIo, (UINTN)Title);\r
-}\r
-\r
-\r
-void \r
-Gasketperror (__const char *__s)\r
-{\r
-  GasketUintn (perror, (UINTN)__s);\r
-  return;\r
-}\r
-\r
-\r
-\r
-//\r
-// ... is always an int or pointer to device specific data structure\r
-//\r
-int \r
-Gasketioctl (int fd, unsigned long int __request, void *Arg)\r
-{\r
-  return GasketUintnUintnUintn (ioctl, fd, __request, (UINTN)Arg);\r
-}\r
-\r
-\r
-int \r
-Gasketfcntl (int __fd, int __cmd, void  *Arg)\r
-{\r
-  return GasketUintnUintnUintn (fcntl, __fd, __cmd, (UINTN)Arg);\r
-}\r
-\r
-\r
-\r
-int \r
-Gasketcfsetispeed (struct termios *__termios_p, speed_t __speed)\r
-{\r
-  return GasketUintnUintn (cfsetispeed, (UINTN)__termios_p, __speed);\r
-}\r
-\r
-\r
-int \r
-Gasketcfsetospeed (struct termios *__termios_p, speed_t __speed)\r
-{\r
-  return GasketUintnUintn (cfsetospeed, (UINTN)__termios_p, __speed);\r
-}\r
-\r
-\r
-int \r
-Gaskettcgetattr (int __fd, struct termios *__termios_p)\r
-{\r
-  return GasketUintnUintn (tcgetattr, __fd, (UINTN)__termios_p);\r
-}\r
-\r
\r
-int \r
-Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__termios_p)\r
-{\r
-  return GasketUintnUintnUintn (tcsetattr, __fd, __optional_actions, (UINTN)__termios_p);\r
-}\r
-\r
-\r
-\r
-\r
-RETURN_STATUS\r
-GasketUnixPeCoffGetEntryPoint (\r
-  IN     VOID  *Pe32Data,\r
-  IN OUT VOID  **EntryPoint\r
-  )\r
-{\r
-  return GasketUintnUintn (SecPeCoffGetEntryPoint, (UINTN)Pe32Data, (UINTN)EntryPoint);\r
-}\r
-\r
-\r
-\r
-VOID\r
-GasketUnixPeCoffRelocateImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  GasketUintn (SecPeCoffRelocateImageExtraAction, (UINTN)ImageContext);\r
-  return;\r
-}\r
-\r
-\r
-\r
-VOID\r
-GasketUnixPeCoffUnloadImageExtraAction (\r
-  IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
-  )\r
-{\r
-  GasketUintn (SecPeCoffLoaderUnloadImageExtraAction, (UINTN)ImageContext);\r
-  return;\r
-}\r
-\r
-\r
-//\r
-// Gasket functions for EFI_UNIX_UGA_IO_PROTOCOL\r
-//\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaClose (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)\r
-{\r
-  return GasketUintn (UgaClose, (UINTN)UgaIo);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaSize (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, UINT32 Width, UINT32 Height)\r
-{\r
-  return GasketUintnUintnUintn (UgaSize, (UINTN)UgaIo, Width, Height);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)\r
-{\r
-  return GasketUintn (UgaCheckKey, (UINTN)UgaIo);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaKeySetState (EFI_UNIX_UGA_IO_PROTOCOL   *UgaIo, EFI_KEY_TOGGLE_STATE *KeyToggleState)\r
-{\r
-  return GasketUintnUintn (UgaGetKey, (UINTN)UgaIo, (UINTN)KeyToggleState);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_KEY_DATA *key)\r
-{\r
-  return GasketUintnUintn (UgaGetKey, (UINTN)UgaIo, (UINTN)key);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaRegisterKeyNotify (\r
-  IN EFI_UNIX_UGA_IO_PROTOCOL           *UgaIo, \r
-  IN UGA_REGISTER_KEY_NOTIFY_CALLBACK   CallBack,\r
-  IN VOID                               *Context\r
-  )\r
-{\r
-  return GasketUintnUintnUintn (UgaRegisterKeyNotify, (UINTN)UgaIo, (UINTN)CallBack, (UINTN)Context);  \r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaBlt (\r
-   EFI_UNIX_UGA_IO_PROTOCOL *UgaIo,\r
-   IN  EFI_UGA_PIXEL                           *BltBuffer OPTIONAL,\r
-   IN  EFI_UGA_BLT_OPERATION                   BltOperation,\r
-   IN  UGA_BLT_ARGS                            *Args\r
-   )\r
-{\r
-  return GasketUintnUintnUintnUintn (UgaBlt, (UINTN)UgaIo, (UINTN)BltBuffer, (UINTN)BltOperation, (UINTN)Args);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaCheckPointer (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)\r
-{\r
-  return GasketUintn (UgaCheckPointer, (UINTN)UgaIo);\r
-}\r
-\r
-EFI_STATUS \r
-EFIAPI \r
-GasketUgaGetPointerState (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_SIMPLE_POINTER_STATE *state)\r
-{\r
-  return GasketUintnUintn (UgaGetPointerState, (UINTN)UgaIo, (UINTN)state);\r
-}\r
-\r
-void\r
-GasketUnixEnableInterrupt (void)\r
-{\r
-  GasketVoid (UnixEnableInterrupt);\r
-}\r
-\r
-void\r
-GasketUnixDisableInterrupt (void)\r
-{\r
-  GasketVoid (UnixDisableInterrupt);\r
-}\r
-\r
-\r
-int\r
-Gasketgetifaddrs (struct ifaddrs **ifap)\r
-{\r
-  return( GasketUintn( getifaddrs, ( UINTN ) ifap ) );\r
-}\r
-\r
-\r
-void\r
-Gasketfreeifaddrs (struct ifaddrs *ifap)\r
-{\r
-  GasketUintn( freeifaddrs, ( UINTN ) ifap );\r
-}\r
-\r
-\r
-int\r
-Gasketsocket (int domain, int type, int protocol )\r
-{\r
-  return( GasketUintnUintnUintn( socket, domain, type, protocol ) );\r
-}\r
-\r
-\r
-#endif\r
-\r