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

/*
* MKNOD: DF_MSS
*/
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
int mknod (const char *path, mode_t mode, int dev)
{
int ret;
if ((mode & S_IFMT) == S_IFDIR)
ret = mkdir(path, (mode & S_IFMT));
else if ((mode & S_IFMT) == S_IFIFO)
ret = mkfifo(path, (mode & S_IFMT));
else {
errno = EPERM;
ret = -1;
}
return ret;
}