summaryrefslogtreecommitdiff
path: root/sys/src/ape/lib/ap/plan9/creat.c
blob: a0f917a62f4ec228dc2585fbd0b02eb98ab00028 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include "lib.h"
#include <sys/stat.h>
#include <fcntl.h>

int
creat(const char *name, mode_t mode)
{
	int n;

	n = open(name, O_WRONLY | O_CREAT | O_TRUNC, mode);
	/* no need to _syserrno; open did it already */
	return n;
}