Home | History | Annotate | Download | only in Uefi
      1 /** @file
      2   Implement the invalid functions to return failures.
      3 
      4   Copyright (c) 2011, Intel Corporation
      5   All rights reserved. This program and the accompanying materials
      6   are licensed and made available under the terms and conditions of the BSD License
      7   which accompanies this distribution.  The full text of the license may be found at
      8   http://opensource.org/licenses/bsd-license
      9 
     10   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     11   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     12 
     13 **/
     14 #include  <LibConfig.h>
     15 #include  <sys/EfiCdefs.h>
     16 #include  <sys/featuretest.h>
     17 #include  <namespace.h>
     18 #include  <stdio.h>
     19 #include  <pwd.h>
     20 #include  <errno.h>
     21 
     22 struct passwd *
     23 getpwuid (uid_t uid)
     24 {
     25   errno = EPERM;
     26   return NULL;
     27 }
     28 
     29 char *
     30 getlogin (void)
     31 {
     32   errno = EPERM;
     33   return NULL;
     34 }
     35 
     36 struct passwd *
     37 getpwnam (const char *name)
     38 {
     39   errno = EPERM;
     40   return NULL;
     41 }
     42 
     43 uid_t
     44 getuid (void)
     45 {
     46   return 0;
     47 }
     48 
     49 pid_t
     50 getpid(void)
     51 {
     52   return 0;
     53 }
     54 
     55 pid_t
     56 fork (void)
     57 {
     58   errno = EPERM;
     59   return (-1);
     60 }
     61 
     62 int
     63 chmod (const char *c, mode_t m)
     64 {
     65   errno = EPERM;
     66   return (-1);
     67 }
     68 
     69 pid_t
     70 wait(int *stat_loc) {
     71   return 0;
     72 }
     73 
     74 FILE *
     75 popen (const char *cmd, const char *type)
     76 {
     77   errno = EPERM;
     78   return NULL;
     79 }
     80 
     81 int
     82 pclose (FILE *stream)
     83 {
     84   errno = EPERM;
     85   return -1;
     86 }
     87 
     88 mode_t
     89 umask(mode_t cmask)
     90 {
     91   return (mode_t)0;
     92 }
     93