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

View file

@ -245,6 +245,16 @@ int inode_find(FAR struct inode_search_s *desc);
struct stat; /* Forward reference */
int inode_stat(FAR struct inode *inode, FAR struct stat *buf, int resolve);
/****************************************************************************
* Name: inode_getpath
*
* Description:
* Given the full path from inode.
*
****************************************************************************/
int inode_getpath(FAR struct inode *node, FAR char *path);
/****************************************************************************
* Name: inode_free
*