diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-07-15 18:42:42 +0000 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-09-11 14:35:27 -0300 |
commit | 23159962159038891d3211c5632c3900d465f0c7 (patch) | |
tree | 219a37a877d21e8d0fcf1497ae503223c4f1b1aa /sysdeps/unix/sysv/linux/xmknod.c | |
parent | 5f85cc2f4712da0d8dd6f9ebf5f7c563e5b6ff3a (diff) | |
download | glibc-23159962159038891d3211c5632c3900d465f0c7.zip glibc-23159962159038891d3211c5632c3900d465f0c7.tar.gz glibc-23159962159038891d3211c5632c3900d465f0c7.tar.bz2 |
Linux: Consolidate xmknod
The __NR_mknodat syscall is supported on all kernels, so the generic
implementation is used as default.
Checked on x86_64-linux-gnu and i686-linux-gnu.
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'sysdeps/unix/sysv/linux/xmknod.c')
-rw-r--r-- | sysdeps/unix/sysv/linux/xmknod.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sysdeps/unix/sysv/linux/xmknod.c b/sysdeps/unix/sysv/linux/xmknod.c index 5d0ae97..42809d4 100644 --- a/sysdeps/unix/sysv/linux/xmknod.c +++ b/sysdeps/unix/sysv/linux/xmknod.c @@ -16,13 +16,10 @@ License along with the GNU C Library; if not, see <https://www.gnu.org/licenses/>. */ -#include <errno.h> -#include <sys/types.h> #include <sys/stat.h> #include <sys/sysmacros.h> - +#include <fcntl.h> #include <sysdep.h> -#include <sys/syscall.h> /* Create a device file named PATH, with permission and special bits MODE and device number DEV (which can be constructed from major and minor @@ -40,7 +37,8 @@ __xmknod (int vers, const char *path, mode_t mode, dev_t *dev) if (k_dev != *dev) return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); - return INLINE_SYSCALL (mknod, 3, path, mode, (unsigned int) k_dev); + return INLINE_SYSCALL_CALL (mknodat, AT_FDCWD, path, mode, + (unsigned int) k_dev); } weak_alias (__xmknod, _xmknod) |