aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/xmknod.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/xmknod.c')
-rw-r--r--sysdeps/mach/hurd/xmknod.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/sysdeps/mach/hurd/xmknod.c b/sysdeps/mach/hurd/xmknod.c
index a1b5af086d..b8705ac235 100644
--- a/sysdeps/mach/hurd/xmknod.c
+++ b/sysdeps/mach/hurd/xmknod.c
@@ -16,25 +16,21 @@
<https://www.gnu.org/licenses/>. */
#include <sys/stat.h>
+#include <errno.h>
#include <fcntl.h>
+#include <hurd.h>
#include <shlib-compat.h>
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
/* 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
__xmknod (int vers, const char *file_name, mode_t mode, dev_t *dev)
{
- return __xmknodat (vers, AT_FDCWD, file_name, mode, dev);
-}
-libc_hidden_def (__xmknod)
+ if (vers != _MKNOD_VER)
+ return __hurd_fail (EINVAL);
-#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_33)
-int
-__xmknod_compat (int vers, const char *file_name, mode_t mode, dev_t *dev)
-{
- return __xmknod (vers, file_name, mode, dev);
+ return __mknodat (AT_FDCWD, file_name, mode, *dev);
}
-
-compat_symbol (libc, __xmknod_compat, __xmknod, GLIBC_2_0);
#endif