mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
LibC: Add LINK_MAX and _PC_LINK_MAX
LINK_MAX was set arbitrarily to 4096, this is not an actual system limit.
This commit is contained in:
parent
d9ecb3ecfa
commit
f16aba405f
3 changed files with 9 additions and 2 deletions
|
@ -619,7 +619,7 @@ int mknod(const char* pathname, mode_t mode, dev_t dev)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
long fpathconf([[maybe_unused]] int fd, [[maybe_unused]] int name)
|
||||
long fpathconf([[maybe_unused]] int fd, int name)
|
||||
{
|
||||
switch (name) {
|
||||
case _PC_NAME_MAX:
|
||||
|
@ -628,6 +628,8 @@ long fpathconf([[maybe_unused]] int fd, [[maybe_unused]] int name)
|
|||
return PATH_MAX;
|
||||
case _PC_VDISABLE:
|
||||
return _POSIX_VDISABLE;
|
||||
case _PC_LINK_MAX:
|
||||
return LINK_MAX;
|
||||
}
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
|
@ -642,6 +644,8 @@ long pathconf([[maybe_unused]] const char* path, int name)
|
|||
return PATH_MAX;
|
||||
case _PC_PIPE_BUF:
|
||||
return PIPE_BUF;
|
||||
case _PC_LINK_MAX:
|
||||
return LINK_MAX;
|
||||
}
|
||||
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue