mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +00:00
LibCore: Implement Core::System::lseek
This commit is contained in:
parent
4d2e3de94c
commit
301f4c469f
Notes:
sideshowbarker
2024-07-17 20:33:56 +09:00
Author: https://github.com/sin-ack
Commit: 301f4c469f
Pull-request: https://github.com/SerenityOS/serenity/pull/11991
Reviewed-by: https://github.com/awesomekling
2 changed files with 9 additions and 0 deletions
|
@ -540,6 +540,14 @@ ErrorOr<pid_t> posix_spawnp(StringView const path, posix_spawn_file_actions_t* c
|
||||||
return child_pid;
|
return child_pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ErrorOr<off_t> lseek(int fd, off_t offset, int whence)
|
||||||
|
{
|
||||||
|
off_t rc = ::lseek(fd, offset, whence);
|
||||||
|
if (rc < 0)
|
||||||
|
return Error::from_syscall("lseek", -errno);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
ErrorOr<WaitPidResult> waitpid(pid_t waitee, int options)
|
ErrorOr<WaitPidResult> waitpid(pid_t waitee, int options)
|
||||||
{
|
{
|
||||||
int wstatus;
|
int wstatus;
|
||||||
|
|
|
@ -87,6 +87,7 @@ ErrorOr<Optional<struct passwd>> getpwuid(uid_t);
|
||||||
ErrorOr<Optional<struct group>> getgrgid(gid_t);
|
ErrorOr<Optional<struct group>> getgrgid(gid_t);
|
||||||
ErrorOr<void> clock_settime(clockid_t clock_id, struct timespec* ts);
|
ErrorOr<void> clock_settime(clockid_t clock_id, struct timespec* ts);
|
||||||
ErrorOr<pid_t> posix_spawnp(StringView const path, posix_spawn_file_actions_t* const file_actions, posix_spawnattr_t* const attr, char* const arguments[], char* const envp[]);
|
ErrorOr<pid_t> posix_spawnp(StringView const path, posix_spawn_file_actions_t* const file_actions, posix_spawnattr_t* const attr, char* const arguments[], char* const envp[]);
|
||||||
|
ErrorOr<off_t> lseek(int fd, off_t, int whence);
|
||||||
|
|
||||||
struct WaitPidResult {
|
struct WaitPidResult {
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue