]> git.proxmox.com Git - mirror_edk2.git/blob - StdLib/LibC/Uefi/StubFunctions.c
Fix GCC build breaks.
[mirror_edk2.git] / StdLib / LibC / Uefi / StubFunctions.c
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 <sys/EfiCdefs.h>
15 #include <sys/featuretest.h>
16 #include <namespace.h>
17 #include <stdio.h>
18 #include <pwd.h>
19 #include <errno.h>
20
21 struct passwd *
22 getpwuid (uid_t uid)
23 {
24 errno = EPERM;
25 return NULL;
26 }
27
28 char *getlogin (void)
29 {
30 errno = EPERM;
31 return NULL;
32 }
33
34 struct passwd *
35 getpwnam (const char *name)
36 {
37 errno = EPERM;
38 return NULL;
39 }
40
41 uid_t getuid (void)
42 {
43 return 0;
44 }
45
46 pid_t fork (void)
47 {
48 errno = EPERM;
49 return (-1);
50 }
51
52 int chmod (const char *c, mode_t m)
53 {
54 errno = EPERM;
55 return (-1);
56 }
57
58 pid_t wait(int *stat_loc) {
59 return 0;
60 }
61
62 FILE *popen (const char *cmd, const char *type)
63 {
64 errno = EPERM;
65 return NULL;
66 }
67
68 int pclose (FILE *stream)
69 {
70 errno = EPERM;
71 return -1;
72 }
73
74 int access (const char *path, int amode)
75 {
76 return 0;
77 }