mknod.c 751 B

12345678910111213141516171819202122232425262728
  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. #include <sys/syscall.h>
  10. #include <sys/stat.h>
  11. #include <sys/sysmacros.h>
  12. #define __NR___syscall_mknod __NR_mknod
  13. /* kernel's fs/namei.c defines this:
  14. * long sys_mknod(const char __user *filename, int mode, unsigned dev),
  15. * so, no __kernel_mode_t and no __kernel_dev_t, please.
  16. */
  17. static __inline__ _syscall3(int, __syscall_mknod,
  18. const char *, path,
  19. int /* __kernel_mode_t */, mode,
  20. unsigned /* __kernel_dev_t */, dev)
  21. int mknod(const char *path, mode_t mode, dev_t dev)
  22. {
  23. return __syscall_mknod(path, mode, dev);
  24. }
  25. libc_hidden_def(mknod)