shithub: riscv

ref: 1d07c2a1614a3121a5b9d86f95394caccd61ee56
dir: /sys/src/ape/lib/ap/plan9/creat.c/

View raw version
#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;
}