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