Soft links: Add an (untested) implementation of readlink()

This commit is contained in:
Gregory Nutt
2017-02-03 13:57:12 -06:00
parent 60ba5a5261
commit 4417e74977
7 changed files with 141 additions and 2 deletions
+1
View File
@@ -99,6 +99,7 @@
"putenv","stdlib.h","!defined(CONFIG_DISABLE_ENVIRON)","int","FAR const char*"
"read","unistd.h","CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0","ssize_t","int","FAR void*","size_t"
"readdir","dirent.h","CONFIG_NFILE_DESCRIPTORS > 0","FAR struct dirent*","FAR DIR*"
"readlink","unistd.h","defined(CONFIG_PSEUDOFS_SOFTLINKS)","ssize_t","FAR const char *","FAR char *","size_t"
"recv","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","ssize_t","int","FAR void*","size_t","int"
"recvfrom","sys/socket.h","CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET)","ssize_t","int","FAR void*","size_t","int","FAR struct sockaddr*","FAR socklen_t*"
"rename","stdio.h","CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT)","int","FAR const char*","FAR const char*"
1 _exit unistd.h void int
99 putenv stdlib.h !defined(CONFIG_DISABLE_ENVIRON) int FAR const char*
100 read unistd.h CONFIG_NSOCKET_DESCRIPTORS > 0 || CONFIG_NFILE_DESCRIPTORS > 0 ssize_t int
101 readdir dirent.h CONFIG_NFILE_DESCRIPTORS > 0 FAR struct dirent* FAR DIR*
102 readlink unistd.h defined(CONFIG_PSEUDOFS_SOFTLINKS) ssize_t FAR const char *
103 recv sys/socket.h CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET) ssize_t int
104 recvfrom sys/socket.h CONFIG_NSOCKET_DESCRIPTORS > 0 && defined(CONFIG_NET) ssize_t int
105 rename stdio.h CONFIG_NFILE_DESCRIPTORS > 0 && !defined(CONFIG_DISABLE_MOUNTPOINT) int FAR const char*
+1
View File
@@ -234,6 +234,7 @@ SYSCALL_LOOKUP(up_assert, 2, STUB_up_assert)
# if defined(CONFIG_PSEUDOFS_SOFTLINKS)
SYSCALL_LOOKUP(link, 2, STUB_link)
SYSCALL_LOOKUP(readlink, 3, STUB_readlink)
# endif
# if defined(CONFIG_PIPES) && CONFIG_DEV_PIPE_SIZE > 0
+2
View File
@@ -239,6 +239,8 @@ uintptr_t STUB_statfs(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_telldir(int nbr, uintptr_t parm1);
uintptr_t STUB_link(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_readlink(int nbr, uintptr_t parm1, uintptr_t parm2,
uintptr_t parm3);
uintptr_t STUB_pipe2(int nbr, uintptr_t parm1, uintptr_t parm2);
uintptr_t STUB_mkfifo2(int nbr, uintptr_t parm1, uintptr_t parm2,