1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 16:47:45 +00:00

More LibC portability work while trying to get figlet building.

This commit is contained in:
Andreas Kling 2018-10-31 10:14:56 +01:00
parent bb90c8ecab
commit 9160fd0d47
12 changed files with 128 additions and 2 deletions

View file

@ -851,6 +851,17 @@ int Task::sys$lstat(const char* path, Unix::stat* statbuf)
return 0;
}
int Task::sys$stat(const char* path, Unix::stat* statbuf)
{
VALIDATE_USER_BUFFER(statbuf, sizeof(Unix::stat));
int error;
auto handle = VirtualFileSystem::the().open(move(path), error, 0, cwdInode());
if (!handle)
return error;
handle->stat(statbuf);
return 0;
}
int Task::sys$readlink(const char* path, char* buffer, size_t size)
{
VALIDATE_USER_BUFFER(path, strlen(path));