Skip to content

Commit c44a8fa

Browse files
implicitfieldtimschumi
authored andcommitted
LibC: Implement mkfifoat(2)
1 parent 4574a8c commit c44a8fa

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Userland/Libraries/LibC/stat.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,12 @@ int mkfifo(char const* pathname, mode_t mode)
8181
return mknod(pathname, mode | S_IFIFO, 0);
8282
}
8383

84+
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/mkfifoat.html
85+
int mkfifoat(int dirfd, char const* pathname, mode_t mode)
86+
{
87+
return mknodat(dirfd, pathname, mode | S_IFIFO, 0);
88+
}
89+
8490
static int do_stat(int dirfd, char const* path, struct stat* statbuf, bool follow_symlinks)
8591
{
8692
if (!path) {

Userland/Libraries/LibC/sys/stat.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ int fchmod(int fd, mode_t);
2020
int mkdir(char const* pathname, mode_t);
2121
int mkdirat(int dirfd, char const* pathname, mode_t);
2222
int mkfifo(char const* pathname, mode_t);
23+
int mkfifoat(int dirfd, char const* pathname, mode_t);
2324
int fstat(int fd, struct stat* statbuf);
2425
int lstat(char const* path, struct stat* statbuf);
2526
int stat(char const* path, struct stat* statbuf);

0 commit comments

Comments
 (0)