Kernel: Add new sysconf option _SC_GETGR_R_SIZE_MAX

This commit is contained in:
hanaa12G 2023-12-25 09:20:31 +07:00 committed by Andrew Kaster
parent 3c52c25515
commit 7abda6a36f
Notes: sideshowbarker 2024-07-16 18:06:41 +09:00
2 changed files with 3 additions and 0 deletions

View file

@ -40,6 +40,7 @@ enum {
_SC_TTY_NAME_MAX,
_SC_PAGESIZE,
_SC_GETPW_R_SIZE_MAX,
_SC_GETGR_R_SIZE_MAX,
_SC_CLK_TCK,
_SC_SYMLOOP_MAX,
_SC_MAPPED_FILES,
@ -57,6 +58,7 @@ enum {
#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
#define _SC_CLK_TCK _SC_CLK_TCK
#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
#define _SC_MAPPED_FILES _SC_MAPPED_FILES

View file

@ -29,6 +29,7 @@ ErrorOr<FlatPtr> Process::sys$sysconf(int name)
case _SC_TTY_NAME_MAX:
return TTY_NAME_MAX;
case _SC_GETPW_R_SIZE_MAX:
case _SC_GETGR_R_SIZE_MAX:
return 4096; // idk
case _SC_CLK_TCK:
return TimeManagement::the().ticks_per_second();