LibC: Implement mkfifoat(2)

This commit is contained in:
implicitfield 2024-04-29 21:05:27 +04:00 committed by Tim Schumacher
parent 4574a8c334
commit c44a8fa57c
Notes: sideshowbarker 2024-07-17 10:08:28 +09:00
2 changed files with 7 additions and 0 deletions

View File

@ -81,6 +81,12 @@ int mkfifo(char const* pathname, mode_t mode)
return mknod(pathname, mode | S_IFIFO, 0);
}
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/mkfifoat.html
int mkfifoat(int dirfd, char const* pathname, mode_t mode)
{
return mknodat(dirfd, pathname, mode | S_IFIFO, 0);
}
static int do_stat(int dirfd, char const* path, struct stat* statbuf, bool follow_symlinks)
{
if (!path) {

View File

@ -20,6 +20,7 @@ int fchmod(int fd, mode_t);
int mkdir(char const* pathname, mode_t);
int mkdirat(int dirfd, char const* pathname, mode_t);
int mkfifo(char const* pathname, mode_t);
int mkfifoat(int dirfd, char const* pathname, mode_t);
int fstat(int fd, struct stat* statbuf);
int lstat(char const* path, struct stat* statbuf);
int stat(char const* path, struct stat* statbuf);