creat -> open

This commit is contained in:
joerg 2009-05-09 20:00:39 +00:00
parent f741f9ce83
commit 784b388b30

View file

@ -1,7 +1,7 @@
/*
* $OpenBSD: inp.c,v 1.34 2006/03/11 19:41:30 otto Exp $
* $DragonFly: src/usr.bin/patch/inp.c,v 1.6 2007/09/29 23:11:10 swildner Exp $
* $NetBSD: inp.c,v 1.2 2008/09/16 11:59:29 joerg Exp $
* $NetBSD: inp.c,v 1.3 2009/05/09 20:00:39 joerg Exp $
*/
/*
@ -170,7 +170,7 @@ plan_a(const char *filename)
if (check_only)
return true;
makedirs(filename, true);
close(creat(filename, 0666));
close(open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0666));
statfailed = stat(filename, &filestat);
}
if (statfailed && check_only)