mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-19 00:31:52 +00:00
Kernel+LibC: Add _SC_TTY_NAME_MAX
This commit is contained in:
parent
b432fd0bc0
commit
2cc3d68615
Notes:
sideshowbarker
2024-07-18 23:06:55 +09:00
Author: https://github.com/linusg
Commit: 2cc3d68615
Pull-request: https://github.com/SerenityOS/serenity/pull/5001
Reviewed-by: https://github.com/alimpfard
3 changed files with 11 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue