diff options
Diffstat (limited to 'ports/linux')
-rw-r--r-- | ports/linux/guts/mknod.c | 13 | ||||
-rw-r--r-- | ports/linux/guts/mknodat.c | 13 | ||||
-rw-r--r-- | ports/linux/pseudo_wrappers.c | 11 | ||||
-rw-r--r-- | ports/linux/wrapfuncs.in | 2 |
4 files changed, 39 insertions, 0 deletions
diff --git a/ports/linux/guts/mknod.c b/ports/linux/guts/mknod.c new file mode 100644 index 0000000..eb90e66 --- /dev/null +++ b/ports/linux/guts/mknod.c @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2016 Wind River Systems; see + * guts/COPYRIGHT for information. + * + * int mknod(const char *path, mode_t mode, dev_t dev) + * int rc = -1; + */ + + rc = wrap___xmknod(_MKNOD_VER, path, mode, &dev); + +/* return rc; + * } + */ diff --git a/ports/linux/guts/mknodat.c b/ports/linux/guts/mknodat.c new file mode 100644 index 0000000..4956a6a --- /dev/null +++ b/ports/linux/guts/mknodat.c @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2016 Wind River Systems; see + * guts/COPYRIGHT for information. + * + * int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) + * int rc = -1; + */ + + rc = wrap___xmknodat(_MKNOD_VER, dirfd, path, mode, &dev); + +/* return rc; + * } + */ diff --git a/ports/linux/pseudo_wrappers.c b/ports/linux/pseudo_wrappers.c index 26b29b0..0e9a41f 100644 --- a/ports/linux/pseudo_wrappers.c +++ b/ports/linux/pseudo_wrappers.c @@ -31,3 +31,14 @@ int pseudo_fstat64(int fd, struct stat64 *buf) { return real___fxstat64(_STAT_VER, fd, buf); } + +/* similar thing happens with mknod */ +int +pseudo_mknod(const char *path, mode_t mode, dev_t dev) { + return real___xmknod(_MKNOD_VER, path, mode, &dev); +} + +int +pseudo_mknodat(int dirfd, const char *path, mode_t mode, dev_t dev) { + return real___xmknodat(_MKNOD_VER, dirfd, path, mode, &dev); +} diff --git a/ports/linux/wrapfuncs.in b/ports/linux/wrapfuncs.in index 3b8955a..c45e01a 100644 --- a/ports/linux/wrapfuncs.in +++ b/ports/linux/wrapfuncs.in @@ -7,6 +7,8 @@ int lchown(const char *path, uid_t owner, gid_t group); /* flags=AT_SYMLINK_NOFO int __fxstatat(int ver, int dirfd, const char *path, struct stat *buf, int flags); int openat(int dirfd, const char *path, int flags, ...{mode_t mode}); int __openat_2(int dirfd, const char *path, int flags); +int mknod(const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknod */ +int mknodat(int dirfd, const char *path, mode_t mode, dev_t dev); /* real_func=pseudo_mknodat */ int __xmknod(int ver, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */ int __xmknodat(int ver, int dirfd, const char *path, mode_t mode, dev_t *dev); /* flags=AT_SYMLINK_NOFOLLOW */ int fcntl(int fd, int cmd, ...{struct flock *lock}); |