Kernel+LibC: Add _SC_TTY_NAME_MAX

This commit is contained in:
Linus Groh 2021-01-18 09:51:21 +01:00 committed by Andreas Kling
parent b432fd0bc0
commit 2cc3d68615
Notes: sideshowbarker 2024-07-18 23:06:55 +09:00
3 changed files with 11 additions and 5 deletions

View file

@ -26,6 +26,7 @@
#include <Kernel/Arch/i386/CPU.h>
#include <Kernel/Process.h>
#include <limits.h>
namespace Kernel {
@ -35,10 +36,12 @@ long Process::sys$sysconf(int name)
case _SC_NPROCESSORS_CONF:
case _SC_NPROCESSORS_ONLN:
return Processor::processor_count();
case _SC_PAGESIZE:
return PAGE_SIZE;
case _SC_OPEN_MAX:
return max_open_file_descriptors();
case _SC_PAGESIZE:
return PAGE_SIZE;
case _SC_TTY_NAME_MAX:
return TTY_NAME_MAX;
default:
return -EINVAL;
}