OSDN Git Service

mknod: widen the parameters to match kernel
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / common / mknod.c
1 /* vi: set sw=4 ts=4: */
2 /*
3  * mknod() for uClibc
4  *
5  * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
6  *
7  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
8  */
9
10 #include <sys/syscall.h>
11 #include <sys/stat.h>
12 #include <sys/sysmacros.h>
13
14 #define __NR___syscall_mknod __NR_mknod
15 /* kernel's fs/namei.c defines this:
16  * long sys_mknod(const char __user *filename, int mode, unsigned dev),
17  * so, no __kernel_mode_t and no __kernel_dev_t, please.
18  */
19 static __inline__ _syscall3(int, __syscall_mknod,
20                 const char *, path,
21                 int /* __kernel_mode_t */, mode,
22                 unsigned /* __kernel_dev_t */, dev)
23
24 int mknod(const char *path, mode_t mode, dev_t dev)
25 {
26         return __syscall_mknod(path, mode, dev);
27 }
28 libc_hidden_def(mknod)