mirror of
https://github.com/apache/nuttx.git
synced 2026-08-21 21:48:38 +00:00
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:
parent
b7653e2fae
commit
2fa1e55628
12 changed files with 264 additions and 2 deletions
|
|
@ -322,6 +322,9 @@ int ftruncate(int fd, off_t length);
|
|||
/* Check if a file descriptor corresponds to a terminal I/O file */
|
||||
|
||||
int isatty(int fd);
|
||||
|
||||
FAR char *ttyname(int fd);
|
||||
int ttyname_r(int fd, FAR char *buf, size_t buflen);
|
||||
#endif
|
||||
|
||||
/* Memory management */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue