Add errno information to some not implemented syscalls. See https://sourceware.org/newlib/libc.html#Syscalls
This commit is contained in:
parent
e69da8b4e2
commit
0ff0769612
|
@ -1,4 +1,5 @@
|
|||
#include <_ansi.h>
|
||||
#include <sys/errno.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
|
@ -43,6 +44,7 @@ _close (int file)
|
|||
int
|
||||
_link (char *old, char *new)
|
||||
{
|
||||
errno = EMLINK;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -76,6 +78,7 @@ _creat (const char *path,
|
|||
int
|
||||
_unlink ()
|
||||
{
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -99,6 +102,7 @@ _exit (n)
|
|||
|
||||
_kill (n, m)
|
||||
{
|
||||
errno = EINVAL;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -141,6 +145,7 @@ _utime (path, times)
|
|||
int
|
||||
_fork ()
|
||||
{
|
||||
errno = EAGAIN;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -148,12 +153,14 @@ int
|
|||
_wait (statusp)
|
||||
int *statusp;
|
||||
{
|
||||
errno = ECHILD;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int
|
||||
_execve (const char *path, char *const argv[], char *const envp[])
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue