. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / posix / _geteuid.c
blob9e272f9b2bc7e2fe2690f5b8e5258a6274b89815
1 #include <lib.h>
2 #define geteuid _geteuid
3 #include <unistd.h>
5 PUBLIC uid_t geteuid()
7 message m;
9 /* POSIX says that this function is always successful and that no
10 * return value is reserved to indicate an error. Minix syscalls
11 * are not always successful and Minix returns the unreserved value
12 * (uid_t) -1 when there is an error.
14 if (_syscall(MM, GETUID, &m) < 0) return ( (uid_t) -1);
15 return( (uid_t) m.m2_i1);