diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-10-26 08:58:01 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2020-12-29 16:44:16 -0300 |
commit | 99468ed45f5a58f584bab60364af937eb6f8afda (patch) | |
tree | c4f743f79860cbee8dd9ff5ec19cd46edb5edcc1 /sysdeps | |
parent | 4d97cc8cf3da925fd06fc37d4daebafce3247719 (diff) | |
download | glibc-99468ed45f5a58f584bab60364af937eb6f8afda.tar.gz glibc-99468ed45f5a58f584bab60364af937eb6f8afda.tar.xz glibc-99468ed45f5a58f584bab60364af937eb6f8afda.zip |
io: Remove xmknod{at} implementations
With xmknod wrapper functions removed (589260cef8), the mknod functions are now properly exported, and version is done using symbols versioning instead of the extra _MKNOD_* argument. It also allows us to consolidate Linux and Hurd mknod implementation. Reviewed-by: Lukasz Majewski <lukma@denx.de>
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/mach/hurd/Makefile | 1 | ||||
-rw-r--r-- | sysdeps/mach/hurd/mknod.c | 31 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/Makefile | 3 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mknod.c | 28 |
4 files changed, 3 insertions, 60 deletions
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile index 571277cf7f..90c6b0e9a3 100644 --- a/sysdeps/mach/hurd/Makefile +++ b/sysdeps/mach/hurd/Makefile @@ -201,6 +201,7 @@ sysdep_routines += f_setlk close_nocancel close_nocancel_nostatus \ pread64_nocancel write_nocancel pwrite64_nocancel \ wait4_nocancel \ xstat fxstat lxstat xstat64 fxstat64 lxstat64 \ + xmknod xmknodat \ fxstatat fxstatat64 endif diff --git a/sysdeps/mach/hurd/mknod.c b/sysdeps/mach/hurd/mknod.c deleted file mode 100644 index 1b9c9db741..0000000000 --- a/sysdeps/mach/hurd/mknod.c +++ /dev/null @@ -1,31 +0,0 @@ -/* Copyright (C) 1991-2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#include <sys/stat.h> -#include <fcntl.h> -#include <shlib-compat.h> - -/* Create a device file named FILE_NAME, with permission and special bits MODE - and device number DEV (which can be constructed from major and minor - device numbers with the `makedev' macro above). */ -int -__mknod (const char *file_name, mode_t mode, dev_t dev) -{ - return __mknodat (AT_FDCWD, file_name, mode, dev); -} -libc_hidden_def (__mknod) -weak_alias (__mknod, mknod) diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile index 899b6c9c77..472eab700d 100644 --- a/sysdeps/unix/sysv/linux/Makefile +++ b/sysdeps/unix/sysv/linux/Makefile @@ -63,7 +63,8 @@ sysdep_routines += adjtimex clone umount umount2 readahead sysctl \ process_vm_readv process_vm_writev clock_adjtime \ time64-support pselect32 \ xstat fxstat lxstat xstat64 fxstat64 lxstat64 \ - fxstatat fxstatat64 + fxstatat fxstatat64 \ + xmknod xmknodat CFLAGS-gethostid.c = -fexceptions CFLAGS-tee.c = -fexceptions -fasynchronous-unwind-tables diff --git a/sysdeps/unix/sysv/linux/mknod.c b/sysdeps/unix/sysv/linux/mknod.c deleted file mode 100644 index 7e290ddc8b..0000000000 --- a/sysdeps/unix/sysv/linux/mknod.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Create a special or ordinary file. Linux version. - Copyright (C) 2020 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - <https://www.gnu.org/licenses/>. */ - -#include <sys/stat.h> -#include <fcntl.h> - -int -__mknod (const char *path, mode_t mode, dev_t dev) -{ - return __mknodat (AT_FDCWD, path, mode, dev); -} -libc_hidden_def (__mknod) -weak_alias (__mknod, mknod) |