mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:47:35 +00:00
Add sys$uname() and a /bin/uname utility.
This commit is contained in:
parent
384e2f24d4
commit
1c45b28da6
15 changed files with 129 additions and 10 deletions
14
LibC/utsname.cpp
Normal file
14
LibC/utsname.cpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#include "utsname.h"
|
||||
#include "errno.h"
|
||||
#include <Kernel/Syscall.h>
|
||||
|
||||
extern "C" {
|
||||
|
||||
int uname(struct utsname* buf)
|
||||
{
|
||||
int rc = Syscall::invoke(Syscall::PosixUname, (dword)buf);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue