libc: Implement ttyname and ttyname_r

Note: this patch can get file path from root pseudo file handle,
but a general infrastructure is setup for other file system too.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I86cd79ebb741f2f43fdd398bb7498c40687d949b
This commit is contained in:
Xiang Xiao
2021-07-08 11:11:28 +08:00
committed by Gustavo Henrique Nihei
parent b7653e2fae
commit 2fa1e55628
12 changed files with 264 additions and 2 deletions
+1
View File
@@ -201,6 +201,7 @@
#define MAX_CANON _POSIX_MAX_CANON
#define MAX_INPUT _POSIX_MAX_INPUT
#define NAME_MAX _POSIX_NAME_MAX
#define TTY_NAME_MAX _POSIX_NAME_MAX
#define NGROUPS_MAX _POSIX_NGROUPS_MAX
#define OPEN_MAX _POSIX_OPEN_MAX
#define PATH_MAX _POSIX_PATH_MAX