Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
412 B

  1. /*
  2. * MKNOD: DF_MSS
  3. */
  4. #include <sys/types.h>
  5. #include <sys/stat.h>
  6. #include <unistd.h>
  7. #include <errno.h>
  8. int mknod (const char *path, mode_t mode, int dev)
  9. {
  10. int ret;
  11. if ((mode & S_IFMT) == S_IFDIR)
  12. ret = mkdir(path, (mode & S_IFMT));
  13. else if ((mode & S_IFMT) == S_IFIFO)
  14. ret = mkfifo(path, (mode & S_IFMT));
  15. else {
  16. errno = EPERM;
  17. ret = -1;
  18. }
  19. return ret;
  20. }