]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UnixPkg/Sec/Gasket.c
Fix issue with fixing tabs.
[mirror_edk2.git] / UnixPkg / Sec / Gasket.c
index 6c7b92fb5cc510447ab558ef144aaedb90474445..04c65f1a8dac6924097e2cf940a40f994c09e73e 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
 \r
-  Copyright (c) 2008-2009, Apple Inc. All rights reserved.\r
+  Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>\r
   \r
-  All rights reserved. This program and the accompanying materials\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
@@ -74,20 +74,20 @@ GasketGetDayLight (void)
 \r
 \r
 int \r
-Gasketpoll (struct pollfd *pfd, int nfds, int timeout)\r
+Gasketpoll (struct pollfd *pfd, unsigned int nfds, int timeout)\r
 {\r
   return GasketUintnUintnUintn (poll, (UINTN)pfd, nfds, timeout);\r
 }\r
 \r
 \r
-int \r
+long\r
 Gasketread (int fd, void *buf, int count)\r
 {\r
   return  GasketUintnUintnUintn (read, fd, (UINTN)buf, count);\r
 }\r
 \r
 \r
-int \r
+long\r
 Gasketwrite (int fd, const void *buf, int count)\r
 {\r
   return  GasketUintnUintnUintn (write, fd, (UINTN)buf, count);\r
@@ -168,10 +168,11 @@ Gasketopendir (const char *pathname)
 }\r
 \r
 \r
-void *\r
+void \r
 Gasketrewinddir (DIR *dir)\r
 {\r
-  return (void *)(UINTN)GasketUintn (rewinddir, (UINTN)dir);\r
+  GasketUintn (rewinddir, (UINTN)dir);\r
+  return;\r
 }\r
 \r
 \r
@@ -265,22 +266,16 @@ Gasketperror (__const char *__s)
 // ... is always an int or pointer to device specific data structure\r
 //\r
 int \r
-Gasketioctl (int fd, unsigned long int __request, ...)\r
+Gasketioctl (int fd, unsigned long int __request, void *Arg)\r
 {\r
-  VA_LIST Marker;\r
-  \r
-  VA_START (Marker, __request);\r
-  return GasketUintnUintnUintn (ioctl, fd, __request, VA_ARG (Marker, UINTN));\r
+  return GasketUintnUintnUintn (ioctl, fd, __request, (UINTN)Arg);\r
 }\r
 \r
 \r
 int \r
-Gasketfcntl (int __fd, int __cmd, ...)\r
+Gasketfcntl (int __fd, int __cmd, void  *Arg)\r
 {\r
-  VA_LIST Marker;\r
-  \r
-  VA_START (Marker, __cmd);\r
-  return GasketUintnUintnUintn (fcntl, __fd, __cmd, VA_ARG (Marker, UINTN));\r
+  return GasketUintnUintnUintn (fcntl, __fd, __cmd, (UINTN)Arg);\r
 }\r
 \r
 \r
@@ -313,40 +308,6 @@ Gaskettcsetattr (int __fd, int __optional_actions, __const struct termios *__ter
 }\r
 \r
 \r
-int \r
-Gasketsigaction (int sig, const struct sigaction *act, struct sigaction *oact)\r
-{\r
-  return GasketUintnUintn (sigaction, (UINTN)act, (UINTN)oact);\r
-}\r
-\r
-\r
-int \r
-Gasketsetcontext (const ucontext_t *ucp)\r
-{\r
-  return GasketUintn (setcontext, (UINTN)ucp);\r
-}\r
-\r
-\r
-int \r
-Gasketgetcontext (ucontext_t *ucp)\r
-{\r
-  return GasketUintn (getcontext, (UINTN)ucp);\r
-}\r
-\r
-\r
-int \r
-Gasketsigemptyset (sigset_t *set)\r
-{\r
-  return GasketUintn (sigemptyset, (UINTN)set);\r
-}\r
-\r
-\r
-int \r
-Gasketsigaltstack (const stack_t *ss, stack_t *oss)\r
-{\r
-  return GasketUintnUintn (sigaltstack, (UINTN)ss, (UINTN)oss);\r
-}\r
-\r
 \r
 \r
 RETURN_STATUS\r
@@ -372,7 +333,7 @@ GasketUnixPeCoffRelocateImageExtraAction (
 \r
 \r
 VOID\r
-GasketPeCoffLoaderUnloadImageExtraAction (\r
+GasketUnixPeCoffUnloadImageExtraAction (\r
   IN OUT PE_COFF_LOADER_IMAGE_CONTEXT  *ImageContext\r
   )\r
 {\r
@@ -408,28 +369,88 @@ GasketUgaCheckKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo)
 \r
 EFI_STATUS \r
 EFIAPI \r
-GasketUgaGetKey (EFI_UNIX_UGA_IO_PROTOCOL *UgaIo, EFI_INPUT_KEY *key)\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  UINTN                                   SourceX,\r
-   IN  UINTN                                   SourceY,\r
-   IN  UINTN                                   DestinationX,\r
-   IN  UINTN                                   DestinationY,\r
-   IN  UINTN                                   Width,\r
-   IN  UINTN                                   Height,\r
-   IN  UINTN                                   Delta OPTIONAL\r
+   IN  UGA_BLT_ARGS                            *Args\r
    )\r
 {\r
-  return GasketUintn10Args (UgaBlt, (UINTN)UgaIo, (UINTN)BltBuffer, BltOperation, SourceX, SourceY, DestinationX, DestinationY, Width, Height, Delta);\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