Add mkfifoat(3).

Looks like I missed one of the *at functions when I added the rest.

Change-Id: If16de82dbf6f9a3ea7bfdcba406ca1c74a3f2279
This commit is contained in:
Elliott Hughes
2014-10-23 19:10:23 -07:00
parent 6c5694b6c8
commit ca8e84c6ff
3 changed files with 21 additions and 1 deletions

View File

@@ -28,6 +28,12 @@
#include <sys/stat.h>
#include <fcntl.h>
int mkfifo(const char* path, mode_t mode) {
return mknod(path, (mode & ~S_IFMT) | S_IFIFO, 0);
return mkfifoat(AT_FDCWD, path, mode);
}
int mkfifoat(int fd, const char* path, mode_t mode) {
return mknodat(fd, path, (mode & ~S_IFMT) | S_IFIFO, 0);
}

View File

@@ -181,6 +181,7 @@ mode_t umask(mode_t mode) {
#endif /* defined(__BIONIC_FORTIFY) */
extern int mkfifo(const char*, mode_t);
extern int mkfifoat(int, const char*, mode_t);
extern int fchmodat(int, const char*, mode_t, int);
extern int mkdirat(int, const char*, mode_t);