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:
parent
bb90c8ecab
commit
9160fd0d47
12 changed files with 128 additions and 2 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue