1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:08:13 +00:00

Add sys$gethostname and /bin/hostname

This commit is contained in:
Andreas Kling 2018-10-26 09:54:29 +02:00
parent 3faaa3e04a
commit 53abfa7ea1
16 changed files with 77 additions and 40 deletions

View file

@ -62,5 +62,11 @@ int sleep(unsigned seconds)
return Syscall::invoke(Syscall::Sleep, (dword)seconds);
}
int gethostname(char* buffer, size_t size)
{
int rc = Syscall::invoke(Syscall::PosixGethostname, (dword)buffer, (dword)size);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}