mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:27:45 +00:00
LibCore: Add syscall wrapper for ptsname()
This commit is contained in:
parent
6b587714e8
commit
748c8b4879
2 changed files with 9 additions and 0 deletions
|
@ -187,4 +187,12 @@ ErrorOr<int> dup2(int source_fd, int destination_fd)
|
|||
return fd;
|
||||
}
|
||||
|
||||
ErrorOr<String> ptsname(int fd)
|
||||
{
|
||||
auto* name = ::ptsname(fd);
|
||||
if (!name)
|
||||
return Error::from_syscall("ptsname"sv, -errno);
|
||||
return String(name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue