summaryrefslogtreecommitdiffstats
path: root/266/regr/spec_files/mknod.c
blob: adc2dc30832729a17d08a4dc59ea3a8e21beb159 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>

int main (int argc, char *argv[]) 
{

	int ret = -1;

	ret = mknod (argv[1] , S_IFREG | 0644, 0);

	if(ret == 0)
	  return ret;
	else
	  return errno;
}