unistd/fpathconf: enhance fpathconf

Change-Id: Id780d7b56b9790206d572d22aa210a8e0222108c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
This commit is contained in:
Jiuzhu Dong 2021-01-19 21:35:07 +08:00 committed by Xiang Xiao
parent c6ed7dd760
commit bdd2c96f08
1 changed files with 15 additions and 0 deletions

View File

@ -117,6 +117,21 @@ long fpathconf(int fildes, int name)
case _PC_PATH_MAX:
return PATH_MAX;
case _PC_LINK_MAX:
return _POSIX_LINK_MAX;
case _PC_NAME_MAX:
return _POSIX_NAME_MAX;
case _PC_PIPE_BUF:
return _POSIX_PIPE_BUF;
case _PC_MAX_CANON:
return _POSIX_MAX_CANON;
case _PC_MAX_INPUT:
return _POSIX_MAX_INPUT;
default:
/* Assume valid but not implemented for the time being */