1*40106Sbostic /* 2*40106Sbostic * Copyright (c) 1989 The Regents of the University of California. 3*40106Sbostic * All rights reserved. 4*40106Sbostic * 5*40106Sbostic * Redistribution and use in source and binary forms are permitted 6*40106Sbostic * provided that the above copyright notice and this paragraph are 7*40106Sbostic * duplicated in all such forms and that any documentation, 8*40106Sbostic * advertising materials, and other materials related to such 9*40106Sbostic * distribution and use acknowledge that the software was developed 10*40106Sbostic * by the University of California, Berkeley. The name of the 11*40106Sbostic * University may not be used to endorse or promote products derived 12*40106Sbostic * from this software without specific prior written permission. 13*40106Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*40106Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*40106Sbostic * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*40106Sbostic */ 17*40106Sbostic 18*40106Sbostic #if defined(LIBC_SCCS) && !defined(lint) 19*40106Sbostic static char sccsid[] = "@(#)creat.c 5.1 (Berkeley) 02/16/90"; 20*40106Sbostic #endif /* LIBC_SCCS and not lint */ 21*40106Sbostic 22*40106Sbostic #include <sys/types.h> 23*40106Sbostic #include <sys/file.h> 24*40106Sbostic 25*40106Sbostic creat(path, mode) 26*40106Sbostic char *path; 27*40106Sbostic mode_t mode; 28*40106Sbostic { 29*40106Sbostic return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)); 30*40106Sbostic } 31