1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 06:07:44 +00:00

Utilities: Add pathchk

This commit is contained in:
Brendan Coles 2021-04-23 20:31:21 +00:00 committed by Linus Groh
parent ac98dc4f7c
commit e0188d27de
2 changed files with 100 additions and 0 deletions

View file

@ -591,6 +591,8 @@ int mknod(const char* pathname, mode_t mode, dev_t dev)
long fpathconf([[maybe_unused]] int fd, [[maybe_unused]] int name)
{
switch (name) {
case _PC_NAME_MAX:
return NAME_MAX;
case _PC_PATH_MAX:
return PATH_MAX;
case _PC_VDISABLE:
@ -603,6 +605,8 @@ long fpathconf([[maybe_unused]] int fd, [[maybe_unused]] int name)
long pathconf([[maybe_unused]] const char* path, int name)
{
switch (name) {
case _PC_NAME_MAX:
return NAME_MAX;
case _PC_PATH_MAX:
return PATH_MAX;
case _PC_PIPE_BUF: