Symbol: O_CREAT
bin/cp/utils.c
196
O_WRONLY | O_TRUNC | O_CREAT |
bin/dd/dd.c
178
oflags = O_CREAT;
bin/mv/mv.c
276
open(to, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, 0)) < 0) {
bin/pax/ar_io.c
60
#define AR_MODE (O_WRONLY | O_CREAT | O_TRUNC) /* mode for archive */
bin/pax/file_subs.c
105
if ((fd = open(arcn->name, O_WRONLY | O_CREAT | O_TRUNC,
bin/pax/file_subs.c
87
if ((fd = open(arcn->name, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL,
bin/pkill/tests/spin_helper.c
101
fd = open(argv[2], O_RDWR | O_CREAT, 0755);
bin/sh/redir.c
182
if ((f = open(fname, O_RDWR|O_CREAT, 0666)) < 0)
bin/sh/redir.c
189
if ((f = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)
bin/sh/redir.c
207
if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
bin/sh/redir.c
212
if ((f = open(fname, O_WRONLY|O_CREAT|O_APPEND, 0666)) < 0)
cddl/usr.sbin/zfsd/case_file.cc
956
int fd(open(saveFile.str().c_str(), O_CREAT|O_TRUNC|O_WRONLY, 0644));
crypto/heimdal/appl/push/push.c
260
out_fd = open(outfilename, O_WRONLY | O_APPEND | O_CREAT, 0666);
crypto/heimdal/appl/rcp/rcp.c
564
if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
crypto/heimdal/kadmin/init.c
150
ret = db->hdb_open(context, db, O_RDWR | O_CREAT, 0600);
crypto/heimdal/kadmin/load.c
388
flags |= O_CREAT | O_TRUNC;
crypto/heimdal/kdc/hpropd.c
218
ret = db->hdb_open(context, db, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/kdc/process.c
276
fd = open(fn, O_WRONLY|O_CREAT|O_APPEND, 0600);
crypto/heimdal/lib/hdb/db3.c
255
if (flags & O_CREAT)
crypto/heimdal/lib/hdb/ndbm.c
147
*fd = open(lock_file, O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/iprop-log.c
393
O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/ipropd_slave.c
306
O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/ipropd_slave.c
371
ret = mydb->hdb_open(context, mydb, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/lib/kadm5/log.c
100
fd = open (log_context->log_file, O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/log.c
134
fd = open (log_context->log_file, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/lib/krb5/fcache.c
430
ret = fcc_open(context, id, &fd, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/fcache.c
986
O_WRONLY | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/keytab_file.c
554
fd = open (d->filename, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/keytab_keyfile.c
336
O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/log.c
316
int i = open(fn, O_WRONLY | O_CREAT |
crypto/heimdal/lib/krb5/test_store.c
304
fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0600);
crypto/heimdal/lib/krb5/test_store.c
321
fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0600);
crypto/heimdal/lib/roken/dumpdata.c
47
fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0640);
crypto/heimdal/lib/roken/mkstemp.c
64
fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
crypto/heimdal/lib/roken/ndbm_wrap.c
162
if (flags & O_CREAT)
crypto/heimdal/lib/roken/socket_wrapper.c
910
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0644);
crypto/krb5/src/kadmin/dbutil/dump.c
186
fd = open(file_ok, O_WRONLY | O_CREAT | O_TRUNC, 0600);
crypto/krb5/src/kprop/kprop.c
586
fd = THREEPARAMOPEN(file_last_prop, O_WRONLY | O_CREAT | O_TRUNC, 0600);
crypto/krb5/src/kprop/kpropd.c
548
lock_fd = open(temp_file_name, O_RDWR | O_CREAT, 0600);
crypto/krb5/src/kprop/kpropd.c
557
database_fd = open(temp_file_name, O_WRONLY | O_CREAT | O_TRUNC, 0600);
crypto/krb5/src/lib/kadm5/logger.c
313
fd = open(&cp[5], O_CREAT | O_WRONLY | append,
crypto/krb5/src/lib/kdb/kdb_log.c
515
log_ctx->ulogfd = open(logname, O_RDWR | O_CREAT, 0600);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
482
flags = O_CREAT | O_EXCL | O_RDWR | O_BINARY | O_CLOEXEC;
crypto/krb5/src/lib/krb5/ccache/t_marshal.c
374
fd = open(filename, O_CREAT|O_TRUNC|O_RDWR, 0700);
crypto/krb5/src/lib/krb5/os/krbfileio.c
59
fd = THREEPARAMOPEN(pathname, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
crypto/krb5/src/lib/krb5/os/trace.c
458
*fd = open(filename, O_WRONLY|O_CREAT|O_APPEND, 0600);
crypto/krb5/src/lib/krb5/rcache/rc_dfl.c
103
fd = open(fname, O_CREAT | O_RDWR | O_NOFOLLOW, 0600);
crypto/krb5/src/lib/krb5/rcache/rc_dfl.c
70
*fd_out = open(fname, O_CREAT | O_RDWR | O_BINARY, 0600);
crypto/krb5/src/lib/krb5/rcache/rc_file2.c
248
fd = open(filename, O_CREAT | O_RDWR | O_BINARY, 0600);
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
301
fd = THREEPARAMOPEN(db->lock->filename,O_RDWR | O_CREAT | O_EXCL,
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
36
db = dbopen(filename, O_RDWR | O_CREAT | O_EXCL, 0600, DB_BTREE, &btinfo);
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
43
lf = THREEPARAMOPEN(lockfilename, O_RDWR | O_CREAT | O_EXCL, 0600);
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
697
dbc->db_lf_file = open(dbc->db_lf_name, O_CREAT | O_RDWR | O_TRUNC,
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
718
retval = open_db(context, dbc, O_RDWR | O_CREAT | O_EXCL, 0600, &dbc->db);
crypto/krb5/src/plugins/kdb/db2/libdb2/db/db.c
54
(O_CREAT | O_EXCL | O_EXLOCK | O_NONBLOCK | O_RDONLY | \
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hsearch.c
63
dbp = (DB *)__hash_open(NULL, O_CREAT | O_RDWR | O_BINARY, 0600, &info, 0);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c
25
if ((dbp = dbopen("test.db",O_RDWR | O_CREAT | O_BINARY, 0664
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
242
db = dbopen(*argv == NULL ? NULL : *argv, O_CREAT|omode|O_BINARY,
crypto/krb5/src/plugins/kdb/db2/libdb2/test/dbtest.c
137
oflags = O_CREAT | O_RDWR | O_BINARY;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/dbtest.c
152
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/driver2.c
84
if (!(db = dbopen("bigtest", O_RDWR | O_CREAT | O_BINARY, 0644, DB_HASH, &info))) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c
75
O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0600, DB_HASH, &ctl))){
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
77
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR|O_BINARY, 0400, DB_HASH, &ctl))) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
78
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR|O_BINARY, 0400, DB_HASH, &ctl))) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/bigtest.c
23
db = dbopen("big2.db", O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0664, DB_HASH, &info);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c
33
db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0664, DB_HASH,
crypto/krb5/src/util/support/mkstemp.c
114
open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0)
crypto/openssh/authfile.c
500
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
crypto/openssh/log.c
321
if ((fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0600)) == -1) {
crypto/openssh/loginrec.c
1601
if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT))
crypto/openssh/loginrec.c
865
if (tty > 0 && (fd = open(UTMP_FILE, O_RDWR|O_CREAT, 0644)) >= 0) {
crypto/openssh/openbsd-compat/mktemp.c
105
fd = open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR);
crypto/openssh/openbsd-compat/regress/utimensattest.c
68
if ((fd = open(TMPFILE, O_CREAT, 0600)) == -1)
crypto/openssh/scp.c
1878
if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) == -1) {
crypto/openssh/sftp-client.c
1650
local_fd = open(local_path, O_WRONLY | O_CREAT |
crypto/openssh/sftp-server.c
270
flags |= O_CREAT;
crypto/openssh/sftp-server.c
761
(flags & (O_CREAT|O_TRUNC)) != 0)) {
crypto/openssh/ssh-keygen.c
2663
if ((wfd = open(wfile, O_WRONLY|O_CREAT|O_TRUNC,
crypto/openssh/sshbuf-io.c
105
if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
crypto/openssh/sshkey-xmss.c
478
if ((lockfd = open(lockfile, O_CREAT|O_RDONLY, 0600)) == -1) {
crypto/openssh/sshkey-xmss.c
618
if ((fd = open(nstatefile, O_CREAT|O_WRONLY|O_EXCL, 0600)) == -1) {
crypto/openssl/apps/lib/apps.c
3102
#ifdef O_CREAT
crypto/openssl/apps/lib/apps.c
3103
mode |= O_CREAT;
crypto/openssl/crypto/rand/randfile.c
204
#if defined(O_CREAT) && !defined(OPENSSL_NO_POSIX_IO) && !defined(OPENSSL_SYS_VMS) && !defined(OPENSSL_SYS_WINDOWS)
crypto/openssl/crypto/rand/randfile.c
213
int fd = open(file, O_WRONLY | O_CREAT | O_BINARY, 0600);
crypto/openssl/ssl/ssl_lib.c
3963
fdno = open(keylogfile, O_WRONLY | O_CREAT | O_APPEND, 0600);
lib/geom/eli/geom_eli.c
1736
filefd = open(file, O_WRONLY | O_TRUNC | O_CREAT, 0600);
lib/libc/db/db/db.c
59
(O_CREAT | O_EXCL | O_EXLOCK | O_NOFOLLOW | O_NONBLOCK | \
lib/libc/db/hash/hash.c
123
((flags & O_ACCMODE) != O_RDONLY || (flags & O_CREAT) != 0);
lib/libc/db/test/btree.tests/main.c
169
db = dbopen(*argv == NULL ? NULL : *argv, O_CREAT|O_RDWR,
lib/libc/db/test/dbtest.c
105
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
lib/libc/db/test/dbtest.c
90
oflags = O_CREAT | O_RDWR;
lib/libc/db/test/hash.tests/driver2.c
72
if (!(db = dbopen("bigtest", O_RDWR | O_CREAT, 0644, DB_HASH, &info))) {
lib/libc/db/test/hash.tests/tcreat3.c
63
O_CREAT|O_TRUNC|O_RDWR, 0600, DB_HASH, &ctl))){
lib/libc/db/test/hash.tests/tdel.c
65
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
lib/libc/db/test/hash.tests/thash4.c
67
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
lib/libc/gen/pututxline.c
183
fd = _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644);
lib/libc/gen/pututxline.c
274
fd = _open(_PATH_UTX_LOG, O_CREAT|O_WRONLY|O_APPEND|O_CLOEXEC, 0644);
lib/libc/gen/pututxline.c
49
fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644);
lib/libc/gen/sem.c
231
if ((oflag & O_CREAT) != 0) {
lib/libc/gen/sem_new.c
163
if (flags & ~(O_CREAT|O_EXCL)) {
lib/libc/gen/sem_new.c
167
if ((flags & O_CREAT) != 0) {
lib/libc/gen/sem_new.c
185
if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT |
lib/libc/gmon/gmon.c
154
fd = _open(outname, O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0666);
lib/libc/gmon/gmon.c
160
log = _open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0664);
lib/libc/stdio/flags.c
63
o = O_CREAT | O_TRUNC;
lib/libc/stdio/flags.c
69
o = O_CREAT | O_APPEND;
lib/libc/stdio/mktemp.c
150
oflags |= O_CREAT | O_EXCL | O_RDWR;
lib/libc/sys/creat.c
47
O_WRONLY | O_CREAT | O_TRUNC, mode));
lib/libc/sys/open.c
44
if ((flags & O_CREAT) != 0) {
lib/libc/sys/openat.c
48
if ((flags & O_CREAT) != 0) {
lib/libc/sys/shm_open.c
58
fd = __sys_shm_open2(path, flags | O_CREAT, mode, SHM_LARGEPAGE, NULL);
lib/libc/tests/db/dbm_nextkey_test.c
33
db = dbm_open(path, O_RDWR | O_CREAT, 0755);
lib/libc/tests/db/dbm_open_test.c
33
ATF_CHECK(dbm_open(path, O_RDONLY | O_CREAT, 0755) != NULL);
lib/libc/tests/db/dbm_open_test.c
35
ATF_CHECK(dbm_open(path, O_RDONLY | O_CREAT | O_EXCL, 0755) == NULL);
lib/libc/tests/db/dbm_open_test.c
43
ATF_CHECK(dbm_open(path, O_WRONLY | O_CREAT, 0755) != NULL);
lib/libc/tests/db/dbm_perm_test.c
28
db = dbm_open(path, O_RDWR | O_CREAT, 0755);
lib/libc/tests/gen/dir2_test.c
149
fd = openat(dd, filename, O_WRONLY | O_CREAT, 0600);
lib/libc/tests/gen/dir2_test.c
72
fd = openat(dd, filename, O_WRONLY | O_CREAT, 0600);
lib/libc/tests/gen/dlopen_empty_test.c
67
fd = open(soname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE);
lib/libc/tests/gen/glob2_test.c
58
fd = open(longname, O_CREAT | O_RDWR, 0666);
lib/libc/tests/gen/opendir_test.c
131
ATF_REQUIRE((fd = open("file", O_CREAT | O_RDWR, 0644)) >= 0);
lib/libc/tests/gen/realpath2_test.c
101
fd = open("aaa", O_RDONLY | O_CREAT, 0600);
lib/libc/tests/secure/fortify_poll_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_random_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_select_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_signal_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_socket_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_stdio_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_stdlib_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_string_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_strings_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_uio_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_unistd_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_wchar_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/stdio/mkostemp_test.c
168
ATF_REQUIRE_MSG(mkostemp(tmpf, O_CREAT) == -1,
lib/libc/tests/stdlib/system_test.c
119
fd[i] = open(fn, O_CREAT|O_EXCL|O_EXLOCK|O_CLOEXEC, 0644);
lib/libc/tests/stdtime/detect_tz_changes_test.c
137
ATF_REQUIRE((fd = open(dfn, O_RDWR | O_CREAT, 0644)) >= 0);
lib/libc/tests/stdtime/detect_tz_changes_test.c
78
ATF_REQUIRE((dfd = open(tfn, O_CREAT | O_TRUNC | O_WRONLY, 0644)) >= 0);
lib/libc/tests/sys/sendfile_test.c
1023
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
1082
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
1106
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
1127
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
415
fd = shm_open(SHM_ANON, O_RDWR|O_CREAT, 0600);
lib/libc/tests/sys/sendfile_test.c
803
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
862
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libcasper/services/cap_fileargs/cap_fileargs.c
102
if ((fa->fa_fdflags & O_CREAT) != 0)
lib/libcasper/services/cap_fileargs/cap_fileargs.c
181
if ((flags & O_CREAT) != 0)
lib/libcasper/services/cap_fileargs/cap_fileargs.c
513
if ((capflags & O_CREAT) == 0)
lib/libcasper/services/cap_fileargs/cap_fileargs.c
542
if ((capflags & O_CREAT) != 0) {
lib/libcasper/services/cap_fileargs/cap_fileargs.c
628
if ((capflags & O_CREAT) != 0)
lib/libcasper/services/cap_fileargs/tests/fileargs_test.c
390
fa = fileargs_init(MAX_FILES, files, O_RDWR | O_CREAT, 666,
lib/libcasper/services/cap_fileargs/tests/fileargs_test.c
570
fa = fileargs_init(MAX_FILES, files, O_RDWR | O_CREAT, 0, &rights,
lib/libcasper/services/cap_sysctl/tests/sysctl_test.c
87
fd = open(file, O_CREAT | O_WRONLY, 0600);
lib/libdpv/dpv.c
588
O_CREAT|O_WRONLY, DEFFILEMODE & ~mask))
lib/libpam/modules/pam_xdg/pam_xdg.c
156
session_file = openat(rt_dir_prefix, xdg_session_file, O_CREAT | O_EXCL, RUNTIME_DIR_MODE);
lib/libpmcstat/libpmcstat_logging.c
508
O_RDONLY : (O_WRONLY|O_CREAT|O_TRUNC),
lib/libprocstat/libprocstat.c
1627
{ O_CREAT, PS_FST_FFLAG_CREAT },
lib/libsecureboot/openpgp/dearmor.c
123
if ((fd = open(outfile, O_WRONLY|O_CREAT|O_TRUNC)) < 0)
lib/libutil/flopen.c
60
if (flags & O_CREAT) {
lib/libutil/pidfile.c
174
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
lib/libutil/quotafile.c
151
(openflags & O_CREAT) != O_CREAT)
lib/libutil/quotafile.c
181
if ((qf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0)) <
lib/libutil/quotafile.c
548
if ((newqf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC,
lib/libutil/tests/flopen_test.c
125
fd1 = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
157
fd1 = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
52
fd = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
72
fd = open(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
99
fd1 = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/uucplock.c
75
if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
libexec/atrun/atrun.c
256
O_WRONLY | O_CREAT | O_EXCL, S_IWUSR | S_IRUSR)) < 0)
libexec/phttpget/phttpget.c
597
fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644);
libexec/tftpd/tests/functional.c
1012
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1046
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1080
fd = open("unix.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1119
fd = open("small.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1146
fd = open("small.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1177
fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
467
fd = open("abspath.txt", O_CREAT | O_RDONLY, 0644);
libexec/tftpd/tests/functional.c
502
fd = open("small.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
520
fd = open("small.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
548
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
578
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
600
fd = open("empty.txt", O_CREAT | O_RDONLY, 0000);
libexec/tftpd/tests/functional.c
615
fd = open("empty.txt", O_CREAT | O_RDONLY, 0644);
libexec/tftpd/tests/functional.c
636
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
661
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
687
fd = open("unix.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
743
fd = open("small.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
768
fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
873
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
908
fd = open("small.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
945
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
973
fd = open("empty.txt", O_CREAT | O_RDONLY, 0440);
libexec/tftpd/tests/functional.c
989
fd = open("empty.txt", O_CREAT | O_RDONLY, 0444);
libexec/tftpd/tftpd.c
668
*fd = open(newname, O_WRONLY | O_CREAT | O_EXCL, 0666);
libexec/tftpd/tftpd.c
778
O_WRONLY | O_TRUNC | O_CREAT,
libexec/ypxfr/yp_dbwrite.c
68
#define FLAGS O_RDWR|O_EXLOCK|O_EXCL|O_CREAT
libexec/ypxfr/ypxfrd_getmap.c
126
if ((fp = open(tmpname, O_RDWR|O_CREAT, PERM_SECURE)) == -1) {
sbin/decryptcore/decryptcore.c
415
ofd = open(core, O_WRONLY | O_CREAT | O_EXCL, 0600);
sbin/dhclient/dhclient.c
523
if ((fd = open(path_dhclient_db, O_RDONLY|O_EXLOCK|O_CREAT, 0)) == -1)
sbin/dump/tape.c
618
open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
sbin/dump/tape.c
621
open(tape, O_WRONLY|O_CREAT, 0666)) < 0)
sbin/init/init.c
603
fd = open(_PATH_INITLOG, O_WRONLY | O_APPEND | O_CREAT, 0644);
sbin/init/init.c
688
fd = open(path, O_WRONLY | O_CREAT | O_EXCL, 0700);
sbin/ipf/ipfs/ipfs.c
378
wfd = open(file, O_WRONLY|O_TRUNC|O_CREAT, 0600);
sbin/ipf/ipfs/ipfs.c
689
nfd = open(file, O_WRONLY|O_TRUNC|O_CREAT, 0600);
sbin/ipf/ipftest/ip_fil.c
347
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
sbin/ipf/ipftest/ip_fil.c
358
fd = open(fname, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
sbin/ipf/ipftest/ipftest.c
610
fd = open(filename, O_CREAT|O_TRUNC|O_WRONLY, 0644);
sbin/ipf/ipmon/ipmon.c
1427
if ((fd = open(file, O_CREAT|O_TRUNC|O_WRONLY, 0644)) >= 0) {
sbin/newfs_msdos/mkfs_msdos.c
277
fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644);
sbin/nvmecontrol/modules/wdc/wdc.c
186
fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sbin/nvmecontrol/modules/wdc/wdc.c
335
fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sbin/nvmecontrol/telemetry.c
135
fdout = open(opt.outfn, O_WRONLY | O_CREAT, 0664);
sbin/quotacheck/preen.c
110
qfu = quota_open(fs, USRQUOTA, O_CREAT|O_RDWR);
sbin/quotacheck/preen.c
113
qfg = quota_open(fs, GRPQUOTA, O_CREAT|O_RDWR);
sbin/quotacheck/quotacheck.c
199
qfu = quota_open(fs, USRQUOTA, O_CREAT|O_RDWR);
sbin/quotacheck/quotacheck.c
202
qfg = quota_open(fs, GRPQUOTA, O_CREAT|O_RDWR);
sbin/recoverdisk/recoverdisk.c
817
write_fd = open(argv[1], O_WRONLY | O_CREAT, DEFFILEMODE);
sbin/restore/dirs.c
143
fd = open(dirfile, O_RDWR|O_CREAT|O_EXCL, 0666);
sbin/restore/dirs.c
157
fd = open(modefile, O_RDWR|O_CREAT|O_EXCL, 0666);
sbin/restore/dirs.c
679
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
sbin/restore/tape.c
702
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
1163
fdcore = openat(savedirfd, corename, O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
142
if ((flags & O_CREAT) == O_CREAT) {
sbin/savecore/savecore.c
274
if ((fp = xfopenat(savedirfd, "bounds", O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
293
fd = openat(savedirfd, keyname, O_WRONLY | O_CREAT | O_TRUNC, 0600);
sbin/savecore/savecore.c
322
O_WRONLY | O_CREAT | O_TRUNC, "w", 0600)) == NULL) {
sbin/shutdown/shutdown.c
577
if ((logfd = open(_PATH_NOLOGIN, O_WRONLY|O_CREAT|O_TRUNC,
stand/liblua/lstd.c
54
o = O_CREAT | O_TRUNC;
stand/usb/tools/sysinit.c
206
output_file = open(output_f, O_TRUNC | O_CREAT | O_RDWR, 0600);
sys/compat/linux/linux_file.c
105
O_WRONLY | O_CREAT | O_TRUNC, args->mode));
sys/compat/linux/linux_file.c
138
bsd_flags |= O_CREAT;
sys/compat/linux/linux_misc.c
2967
if ((flags & O_CREAT) != 0 && args->attr != NULL) {
sys/compat/linux/linux_misc.c
897
O_WRONLY | O_CREAT | O_TRUNC, args->mode);
sys/compat/linux/linux_misc.c
939
O_WRONLY | O_CREAT | O_TRUNC, args->mode);
sys/dev/aic7xxx/aicasm/aicasm_symbol.c
135
O_CREAT | O_NONBLOCK | O_RDWR, /*mode*/0, DB_HASH,
sys/fs/fuse/fuse_vnops.c
1161
fci->flags = O_CREAT | flags;
sys/fs/unionfs/union_subr.c
1289
fmode = FFLAGS(O_WRONLY | O_CREAT | O_TRUNC | O_EXCL);
sys/kern/coredump_vnode.c
223
flags = O_CREAT | FWRITE | O_NOFOLLOW;
sys/kern/coredump_vnode.c
238
if ((flags & O_CREAT) == O_CREAT) {
sys/kern/coredump_vnode.c
401
flags = O_CREAT | FWRITE | O_NOFOLLOW;
sys/kern/kern_alq.c
446
oflags = FWRITE | O_NOFOLLOW | O_CREAT;
sys/kern/kern_descrip.c
4734
{ O_CREAT, KF_FLAG_CREAT },
sys/kern/uipc_mqueue.c
2024
if ((flags & O_CREAT) != 0 && attr != NULL) {
sys/kern/uipc_mqueue.c
2063
if (!(flags & O_CREAT)) {
sys/kern/uipc_mqueue.c
2084
if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) {
sys/kern/uipc_mqueue.c
2128
if ((flags & O_CREAT) != 0 && uap->attr != NULL) {
sys/kern/uipc_mqueue.c
2787
if ((flags & O_CREAT) != 0 && uap->attr != NULL) {
sys/kern/uipc_sem.c
536
if (flags & O_CREAT) {
sys/kern/uipc_sem.c
551
if ((flags & (O_CREAT | O_EXCL)) ==
sys/kern/uipc_sem.c
552
(O_CREAT | O_EXCL))
sys/kern/uipc_sem.c
643
if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0)
sys/kern/uipc_sem.c
980
if ((uap->oflag & ~(O_CREAT | O_EXCL)) != 0)
sys/kern/uipc_shm.c
1161
if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC |
sys/kern/uipc_shm.c
1254
if (flags & O_CREAT) {
sys/kern/uipc_shm.c
1306
else if ((flags & (O_CREAT | O_EXCL)) ==
sys/kern/uipc_shm.c
1307
(O_CREAT | O_EXCL))
sys/kern/vfs_syscalls.c
1113
if (flags & O_CREAT)
sys/kern/vfs_syscalls.c
1382
O_WRONLY | O_CREAT | O_TRUNC, uap->mode));
sys/kern/vfs_syscalls.c
4753
if ((flags & O_CREAT) != 0)
sys/kern/vfs_vnops.c
266
if ((fmode & (O_CREAT | O_EXCL | O_DIRECTORY)) == (O_CREAT |
sys/kern/vfs_vnops.c
268
(fmode & (O_CREAT | O_EMPTY_PATH)) == (O_CREAT | O_EMPTY_PATH))
sys/kern/vfs_vnops.c
270
else if ((fmode & (O_CREAT | O_DIRECTORY)) == O_CREAT) {
sys/kern/vfs_vnops.c
361
fmode &= ~O_CREAT;
sys/kern/vfs_vnops.c
420
if ((fmode & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
sys/kern/vfs_vnops.c
465
if ((fmode & O_CREAT) != 0)
sys/kern/vfs_vnops.c
480
if ((fmode & O_CREAT) == 0 && accmode != 0) {
sys/ofed/drivers/infiniband/core/ib_uverbs_cmd.c
592
if (!xrcd && !(cmd.oflags & O_CREAT)) {
sys/security/audit/audit_bsm_klib.c
216
oflags = oflags & (O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY);
sys/security/audit/audit_bsm_klib.c
232
oflags = oflags & (O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY);
sys/security/audit/audit_bsm_klib.c
67
{ (O_RDONLY | O_CREAT), AUE_OPEN_RC },
sys/security/audit/audit_bsm_klib.c
68
{ (O_RDONLY | O_CREAT | O_TRUNC), AUE_OPEN_RTC },
sys/security/audit/audit_bsm_klib.c
71
{ (O_RDWR | O_CREAT), AUE_OPEN_RWC },
sys/security/audit/audit_bsm_klib.c
72
{ (O_RDWR | O_CREAT | O_TRUNC), AUE_OPEN_RWTC },
sys/security/audit/audit_bsm_klib.c
75
{ (O_WRONLY | O_CREAT), AUE_OPEN_WC },
sys/security/audit/audit_bsm_klib.c
76
{ (O_WRONLY | O_CREAT | O_TRUNC), AUE_OPEN_WTC },
sys/security/audit/audit_bsm_klib.c
82
{ (O_RDONLY | O_CREAT), AUE_OPENAT_RC },
sys/security/audit/audit_bsm_klib.c
83
{ (O_RDONLY | O_CREAT | O_TRUNC), AUE_OPENAT_RTC },
sys/security/audit/audit_bsm_klib.c
86
{ (O_RDWR | O_CREAT), AUE_OPENAT_RWC },
sys/security/audit/audit_bsm_klib.c
87
{ (O_RDWR | O_CREAT | O_TRUNC), AUE_OPENAT_RWTC },
sys/security/audit/audit_bsm_klib.c
90
{ (O_WRONLY | O_CREAT), AUE_OPENAT_WC },
sys/security/audit/audit_bsm_klib.c
91
{ (O_WRONLY | O_CREAT | O_TRUNC), AUE_OPENAT_WTC },
sys/sys/fcntl.h
223
#define FRDAHEAD O_CREAT
tests/sys/aio/aio_kqueue_test.c
95
fd = open(file, O_RDWR|O_CREAT, 0666);
tests/sys/aio/aio_test.c
1065
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1471
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1514
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1602
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1639
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1713
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1735
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1765
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
457
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
987
fd = open(vdev_name, O_RDWR | O_CREAT, 0600);
tests/sys/aio/lio_kqueue_test.c
90
fd = open(file, O_RDWR|O_CREAT, 0666);
tests/sys/aio/lio_test.c
222
fd = open("testfile", O_CREAT | O_RDWR, 0666);
tests/sys/aio/lio_test.c
301
fd = open("testfile", O_CREAT | O_RDWR, 0666);
tests/sys/aio/lio_test.c
80
fd = open(path, O_RDWR|O_CREAT, 0666);
tests/sys/audit/administrative.c
281
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/administrative.c
328
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_WRONLY, mode)) != -1);
tests/sys/audit/administrative.c
396
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/administrative.c
403
ATF_REQUIRE((filedesc2 = open("acct_ok", O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
1044
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
1099
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
155
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-attribute-access.c
248
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
292
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-attribute-access.c
435
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
468
ATF_REQUIRE_ERRNO(EINVAL, fhopen(NULL, O_CREAT) == -1);
tests/sys/audit/file-attribute-access.c
491
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
542
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
590
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
634
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
678
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
68
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
723
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
815
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
861
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-access.c
923
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
1002
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
1059
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
115
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
1171
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
1229
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
166
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
211
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
258
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
346
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
390
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
437
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
525
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
570
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
616
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
70
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
705
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
750
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
797
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-attribute-modify.c
885
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-close.c
106
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-create.c
307
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-create.c
350
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-create.c
393
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-create.c
436
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-delete.c
137
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-delete.c
180
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-delete.c
94
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-write.c
51
ATF_REQUIRE((filedesc = open(path, O_CREAT, mode)) != -1);
tests/sys/audit/file-write.c
96
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR)) != -1);
tests/sys/audit/inter-process.c
1413
ATF_REQUIRE(shm_open(SHM_ANON, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1);
tests/sys/audit/inter-process.c
1458
ATF_REQUIRE(shm_open(dirpath, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1);
tests/sys/audit/network.c
1045
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDONLY, mode)) != -1);
tests/sys/audit/open.c
113
ATF_REQUIRE((filedesc = open(path, O_CREAT, o_mode)) != -1); \
tests/sys/audit/open.c
160
OPEN_AT_TC_DEFINE(read_creat, "read,creat", O_RDONLY | O_CREAT, "fr")
tests/sys/audit/open.c
162
OPEN_AT_TC_DEFINE(read_creat_trunc, "read,creat,trunc", O_RDONLY | O_CREAT
tests/sys/audit/open.c
165
OPEN_AT_TC_DEFINE(write_creat, "write,creat", O_WRONLY | O_CREAT, "fw")
tests/sys/audit/open.c
167
OPEN_AT_TC_DEFINE(write_creat_trunc, "write,creat,trunc", O_WRONLY | O_CREAT
tests/sys/audit/open.c
170
OPEN_AT_TC_DEFINE(read_write_creat, "read,write,creat", O_RDWR | O_CREAT, "fw")
tests/sys/audit/open.c
173
O_CREAT | O_TRUNC, "fw")
tests/sys/audit/open.c
73
ATF_REQUIRE((filedesc = open(path, O_CREAT, o_mode)) != -1); \
tests/sys/capsicum/bindat_connectat.c
52
if (flags & O_CREAT) {
tests/sys/capsicum/capability-fd-pair.cc
11
int in_fd = open(TmpFile("cap_sendfile_in"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/capability-fd.cc
1006
int fd = open(TmpFile("cap_fd_transfer"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
1154
int fd = open(TmpFile("cap_extattr"), O_RDONLY|O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
1255
int fd = open(TmpFile("cap_root_owned"), O_RDONLY|O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
270
int file = openat(dir, "cap_openat_testfile", O_RDONLY|O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
293
int fd = open(TmpFile("cap_file_sync"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
343
int file = openat(dir, filename, O_WRONLY|O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
412
int fd = open(TmpFile("cap_mmap_operations"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
579
int fd = open(TmpFile("cap_fd_operations"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
648
int rc = openat(dfd_cap, "cap_create", O_CREAT | O_RDONLY, 0600);
tests/sys/capsicum/capability-fd.cc
654
rc = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY | O_APPEND, 0600);
tests/sys/capsicum/capability-fd.cc
660
rc = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR | O_APPEND, 0600);
tests/sys/capsicum/capability-fd.cc
667
rc = openat(dirfd, "cap_faccess", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
674
rc = openat(dirfd, "cap_fsync", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
709
rc = openat(dirfd, "cap_ftruncate", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
729
rc = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY, 0600);
tests/sys/capsicum/capability-fd.cc
735
rc = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR, 0600);
tests/sys/capsicum/capability-fd.cc
742
rc = openat(dirfd, "cap_fsync", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
771
rc = openat(dirfd, "cap_chflagsat", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
778
rc = openat(dirfd, "cap_fchownat", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
785
rc = openat(dirfd, "cap_fchmodat", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
792
rc = openat(dirfd, "cap_fstatat", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
800
rc = openat(dirfd, "cap_futimesat", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
810
rc = openat(dirfd, "cap_linkat_src", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
851
rc = openat(dirfd, "cap_renameat_src", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
863
rc = openat(dirfd, "cap_renameat_src", O_CREAT, 0600);
tests/sys/capsicum/capability-fd.cc
882
rc = openat(dirfd, "cap_unlinkat", O_CREAT, 0600);
tests/sys/capsicum/capmode.cc
31
fd_file_(open(TmpFile("cap_capmode"), O_RDWR|O_CREAT, 0644)),
tests/sys/capsicum/capmode.cc
401
int file = openat(dfd, "testfile", O_RDONLY|O_CREAT, 0644);
tests/sys/capsicum/capmode.cc
463
int file = openat(dfd, "testfile", O_RDONLY|O_CREAT, 0644);
tests/sys/capsicum/copy_file_range.cc
43
int fd = open(filename, O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/fcntl.cc
149
int fd = open(TmpFile("cap_fcntl_cmds"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
208
int fd = open(TmpFile("cap_fcntl_readlock"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
255
int fd = open(TmpFile("cap_fcntl_subrightnorm"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
282
int fd = open(TmpFile("cap_fcntl_subrightpreserve"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
315
int fd = open(TmpFile("cap_fcntl_subrights"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
36
files["SHM"] = shm_open(shm_name, (O_CREAT|O_RDWR), 0600);
tests/sys/capsicum/fexecve.cc
65
int fd = open(temp_script_filename_, O_RDWR|O_CREAT, 0755);
tests/sys/capsicum/linux.cc
1076
int fd = open(TmpFile("cap_bpf_capmode"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
1114
int fd = open(TmpFile("cap_aio"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
1291
int fd_all = open(TmpFile("cap_lease"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
1320
int fd = open(TmpFile("cap_invalid_rights"), O_RDONLY|O_CREAT, 0644);
tests/sys/capsicum/linux.cc
1366
int fd = openat(dir, "cap_openbyhandle_testfile", O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/linux.cc
331
int fd = open(TmpFile("cap_fstatat"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
417
int fd = open(TmpFile("cap_notify/file"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
456
int fd = open(TmpFile("cap_notify/temp"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
551
int fd = open(TmpFile("cap_inotify"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/mqueue.cc
32
int mq = mq_open_("/cap_mq", O_RDWR|O_CREAT, 0644, NULL);
tests/sys/capsicum/mqueue.cc
63
EXPECT_CAPMODE(mq_open_("/cap_mw", O_RDWR|O_CREAT, 0644, NULL));
tests/sys/capsicum/openat.cc
21
int fd = open(filename, O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/rename.cc
20
int src_fd = open(src_path, O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/select.cc
31
int fd = open(TmpFile("cap_select"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/select.cc
98
int fd = open(TmpFile("cap_poll"), O_RDWR | O_CREAT, 0644);
tests/sys/cddl/zfs/bin/file_trunc.c
80
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/sys/cddl/zfs/bin/file_write.c
152
oflag = (O_RDWR|O_CREAT);
tests/sys/cddl/zfs/bin/largest_file.c
69
fd = open(testfile, O_CREAT | O_RDWR);
tests/sys/cddl/zfs/bin/mkfile.c
44
#define MKFILE_FLAG (O_WRONLY | O_CREAT | O_TRUNC)
tests/sys/cddl/zfs/bin/mktree.c
167
if ((fd = open(pname, O_CREAT|O_RDWR, 0777)) < 0) {
tests/sys/cddl/zfs/bin/mktree.c
179
if ((afd = openat(fd, "xattr", O_CREAT | O_RDWR | O_XATTR, 0777)) < 0) {
tests/sys/cddl/zfs/bin/mmapwrite.c
79
if ((fd = open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 0666)) == -1) {
tests/sys/cddl/zfs/bin/randfree_file.c
79
if ((fd = open(filename, O_RDWR|O_CREAT|O_TRUNC)) < 0) {
tests/sys/cddl/zfs/bin/readmmap.c
76
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/sys/cddl/zfs/bin/rm_lnkcnt_zero_file.c
118
fd = open(filebase, O_APPEND | O_RDWR | O_CREAT, 0644);
tests/sys/cddl/zfs/bin/rm_lnkcnt_zero_file.c
97
*fd = open(filebase, O_APPEND | O_RDWR | O_CREAT, 0644);
tests/sys/cddl/zfs/tests/ctime/ctime_001_pos.c
131
fd = open(tfile, O_WRONLY | O_CREAT | O_TRUNC, ALL_MODE);
tests/sys/cddl/zfs/tests/threadsappend/threadsappend.c
107
outfd = open(argv[optind++], O_RDWR|O_CREAT|O_APPEND|O_TRUNC, 0777);
tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c
435
outfd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c
500
outfd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/file/fspacectl_test.c
197
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
222
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
246
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
270
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
295
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
320
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/ftruncate_test.c
76
fd = open(path, O_RDWR|O_CREAT, 0600);
tests/sys/file/path_test.c
345
fd = openat(pathfd, "test", O_RDWR | O_CREAT, 0600);
tests/sys/file/path_test.c
356
openat(pathfd, "test2", O_RDWR | O_CREAT, 0600) < 0);
tests/sys/file/path_test.c
384
openat(pathfd, "test2", O_RDWR | O_CREAT, 0600) < 0);
tests/sys/file/path_test.c
623
fd = open(path, O_CREAT | O_RDONLY, 0600);
tests/sys/file/path_test.c
690
pathfd = open(path, O_PATH | O_CREAT, 0600);
tests/sys/fs/fusefs/access.cc
141
EXPECT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, mode));
tests/sys/fs/fusefs/create.cc
143
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
184
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
205
EXPECT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, mode));
tests/sys/fs/fusefs/create.cc
254
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
288
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
319
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
343
EXPECT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, mode));
tests/sys/fs/fusefs/create.cc
366
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
407
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
439
fd = open(FULLPATH, O_CREAT | O_WRONLY, mode);
tests/sys/fs/fusefs/create.cc
466
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/create.cc
490
fd = open(FULLPATH, O_CREAT | O_EXCL, mode);
tests/sys/fs/fusefs/default_permissions.cc
1059
fd = open(FULLPATH, O_CREAT | O_RDWR, 0);
tests/sys/fs/fusefs/default_permissions.cc
1358
fd = open(FULLPATH, O_CREAT | O_RDWR, 0);
tests/sys/fs/fusefs/default_permissions.cc
601
fd = open(FULLPATH, O_CREAT | O_EXCL, 0644);
tests/sys/fs/fusefs/default_permissions.cc
615
ASSERT_EQ(-1, open(FULLPATH, O_CREAT | O_EXCL, 0644));
tests/sys/fs/fusefs/default_permissions.cc
928
fd = open(FULLPATH, O_CREAT | O_RDWR, 0);
tests/sys/fs/fusefs/io.cc
90
m_backing_fd = open("backing_file", O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/fs/fusefs/io.cc
93
m_control_fd = open("control", O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/fs/fusefs/open.cc
228
test_ok(O_WRONLY | O_CREAT, O_WRONLY);
tests/sys/fs/tarfs/mktar.c
73
if ((fd = open(filename, O_RDWR|O_CREAT|O_EXCL, mode)) < 0)
tests/sys/fs/tarfs/mktar.c
92
if ((fd = open(filename, O_RDWR|O_CREAT|O_EXCL, mode)) < 0)
tests/sys/kern/copy_file_range.c
129
fd2 = open("copy", O_RDWR | O_CREAT, 0644);
tests/sys/kern/fdgrowtable_test.c
85
ATF_REQUIRE((fd = open(AFILE, O_CREAT, 0644)) != -1);
tests/sys/kern/getdirentries_test.c
157
ATF_REQUIRE((fd = open("file", O_CREAT | O_RDWR, 0644)) >= 0);
tests/sys/kern/getdirentries_test.c
56
ATF_REQUIRE((fd = open("file", O_CREAT | O_WRONLY, 0644)) >= 0);
tests/sys/kern/inotify_test.c
273
fd = open(file, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
353
fd = openat(dfd, "file", O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
372
fd = openat(dfd, "file2", O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
423
fd = openat(dfd, name, O_CREAT | O_RDWR, 0644);
tests/sys/kern/inotify_test.c
471
fd1 = open("sink", O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
582
fd = open(file1, O_RDONLY | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
624
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
689
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
700
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
706
fd = open(file, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
739
fd = open(path1, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
805
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/kern_descrip_test.c
121
ATF_REQUIRE((fd = open(AFILE, O_CREAT, 0644)) != -1);
tests/sys/kern/kern_descrip_test.c
123
ATF_REQUIRE((fd = open(RENDEZVOUS, O_CREAT, 0644)) != -1);
tests/sys/kern/kern_descrip_test.c
60
ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1);
tests/sys/kern/kern_descrip_test.c
78
ATF_REQUIRE((fd1 = open(AFILE, O_CREAT, 0644)) != -1);
tests/sys/kern/ktrace_test.c
125
O_RDONLY | O_CREAT | O_TRUNC, 0600)) != -1);
tests/sys/kern/ktrace_test.c
441
O_RDONLY | O_CREAT)) != -1);
tests/sys/kern/ktrace_test.c
521
CHILD_REQUIRE(shm_open("/ktrace_shm", O_RDWR | O_CREAT,
tests/sys/kern/socket_msg_trunc.c
180
fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/mqueue/mqtest1.c
21
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest2.c
35
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest3.c
37
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest4.c
38
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest5.c
48
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/netinet/ip6_v4mapped_test.c
116
fd = open(SYSCTLBAKFILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,
tests/sys/netinet/tcp_connect_port_test.c
84
fd = open(SYSCTLBAKFILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,
tests/sys/posixshm/posixshm_test.c
1009
fd = shm_open(test_path, O_CREAT | O_RDWR, 0600);
tests/sys/posixshm/posixshm_test.c
1026
fd = shm_open(test_path, O_CREAT | O_RDWR, 0600);
tests/sys/posixshm/posixshm_test.c
1033
fd = shm_open(test_path, O_CREAT | O_RDWR, 0660);
tests/sys/posixshm/posixshm_test.c
1040
fd = shm_open(test_path, O_CREAT | O_RDWR, 0666);
tests/sys/posixshm/posixshm_test.c
1099
fd = shm_open("/testtest", O_RDWR | O_CREAT, 0666);
tests/sys/posixshm/posixshm_test.c
1175
fd = shm_open("/testtest1", O_RDWR | O_CREAT, 0666);
tests/sys/posixshm/posixshm_test.c
1204
fd = shm_open(test_path, O_RDONLY | O_CREAT, 0644);
tests/sys/posixshm/posixshm_test.c
1227
fd = shm_create_largepage(SHM_ANON, O_CREAT | O_RDWR, psind, policy, 0);
tests/sys/posixshm/posixshm_test.c
126
fd = shm_open(path, O_CREAT|O_EXCL|O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
130
fd = shm_open(test_path, O_CREAT | O_EXCL | O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
1310
fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0);
tests/sys/posixshm/posixshm_test.c
1329
fd = __sys_shm_open2(SHM_ANON, O_CREAT | O_RDWR, 0, SHM_LARGEPAGE,
tests/sys/posixshm/posixshm_test.c
1903
fd = shm_create_largepage(test_path, O_CREAT | O_RDWR, psind,
tests/sys/posixshm/posixshm_test.c
574
fd = shm_open(test_path, O_RDONLY | O_CREAT, 0777);
tests/sys/posixshm/posixshm_test.c
598
fd = shm_open(test_path, O_RDONLY | O_CREAT, 0777);
tests/sys/posixshm/posixshm_test.c
683
fd = shm_open(test_path, O_RDONLY|O_CREAT, 0777);
tests/sys/posixshm/posixshm_test.c
687
shm_open_should_fail(test_path, O_RDONLY|O_CREAT|O_EXCL,
tests/sys/posixshm/posixshm_test.c
703
fd = shm_open(test_path, O_RDWR | O_CREAT, 0777);
tests/sys/posixshm/posixshm_test.c
754
fd = shm_open(SHM_ANON, O_CREAT|O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
923
desc = shm_open(test_path, O_EXCL | O_CREAT | O_RDWR, 0600);
tests/sys/vfs/lookup_cap_dotdot.c
47
ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
tests/sys/vm/mlock_test.c
203
shmfd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
tests/sys/vm/page_fault_signal.c
130
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
tests/sys/vm/page_fault_signal.c
153
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
tools/regression/doat/doat.c
158
i = open("tmp/foo", O_RDONLY | O_CREAT, 0666);
tools/regression/doat/doat.c
495
tests[9].tests[4].params[2].i = O_RDONLY | O_CREAT;
tools/regression/fsx/fsx.c
1156
fd = open(fname, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 0666);
tools/regression/fsx/fsx.c
1163
fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
tools/regression/nfsmmap/test1/test1.c
17
fd = open("test1.data", O_RDWR|O_CREAT, 0666);
tools/regression/nfsmmap/test1/test1.c
40
fd2 = open("test1.scratch", O_RDWR|O_CREAT, 0666);
tools/regression/nfsmmap/test2/test2.c
17
fd = open("test2.data", O_RDWR|O_CREAT, 0666);
tools/regression/nfsmmap/test2/test2.c
38
fd2 = open("test2.scratch", O_RDWR|O_CREAT, 0666);
tools/regression/posixsem/posixsem.c
1025
if (ksem_open(&id, TEST_PATH, O_CREAT, 0777, 0)) {
tools/regression/posixsem/posixsem.c
1243
if (ksem_open(&id, buffer, O_CREAT, 0777, 1) < 0) {
tools/regression/posixsem/posixsem.c
239
if (ksem_open(&id, TEST_PATH, O_CREAT, 0777, 1) < 0) {
tools/regression/posixsem/posixsem.c
276
ksem_open_should_fail(TEST_PATH, O_CREAT, 0777, UINT_MAX, EINVAL);
tools/regression/posixsem/posixsem.c
314
if (ksem_open(&id, TEST_PATH, O_CREAT, 0777, 1) < 0) {
tools/regression/posixsem/posixsem.c
320
ksem_open_should_fail(TEST_PATH, O_CREAT | O_EXCL, 0777, 1, EEXIST);
tools/regression/posixsem/posixsem.c
360
if (ksem_open(&id, TEST_PATH, O_CREAT, 0777, 1) < 0) {
tools/regression/posixsem/posixsem.c
427
if (ksem_open(&id, TEST_PATH, O_CREAT, 0777, 1) < 0) {
tools/regression/posixsem/posixsem.c
573
if (ksem_open(&id, TEST_PATH, O_CREAT | O_EXCL, 0777, 1) < 0) {
tools/regression/posixsem2/semtest.c
104
s = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
tools/regression/posixsem2/semtest.c
107
s2 = sem_open(SEM_NAME, O_CREAT | O_EXCL, 0777, 0);
tools/regression/posixsem2/semtest.c
62
s = sem_open(SEM_NAME, O_CREAT, 0777, 0);
tools/regression/posixsem2/semtest.c
65
s2 = sem_open(SEM_NAME, O_CREAT, 0777, 0);
tools/regression/security/access/testaccess.c
87
error = open(fd_list[i].fd_name, O_CREAT | O_EXCL, fd_list[i].fd_mode);
tools/regression/security/cap_test/cap_test_capabilities.c
184
ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDONLY, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
189
ret = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY | O_APPEND,
tools/regression/security/cap_test/cap_test_capabilities.c
195
ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR | O_APPEND, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
204
ret = openat(dirfd, "cap_fsync", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
236
ret = openat(dirfd, "cap_ftruncate", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
253
ret = openat(dfd_cap, "cap_create", O_CREAT | O_WRONLY, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
258
ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
265
ret = openat(dirfd, "cap_fsync", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
293
ret = openat(dirfd, "cap_chflagsat", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
303
ret = openat(dirfd, "cap_fchownat", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
313
ret = openat(dirfd, "cap_fchmodat", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
330
ret = openat(dirfd, "cap_fstatat", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
346
ret = openat(dirfd, "cap_futimesat", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
353
ret = openat(dirfd, "cap_linkat_src", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
379
ret = openat(dirfd, "cap_unlinkat", O_CREAT, 0600);
tools/regression/security/cap_test/cap_test_capmode.c
72
REQUIRE(fd_file = open("/tmp/cap_capmode", O_RDWR|O_CREAT, 0644));
tools/regression/sockets/sendfile/sendfile.c
470
file_fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/regression/ufs/uprintf/ufs_uprintf.c
138
fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/regression/ufs/uprintf/ufs_uprintf.c
151
fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/regression/ufs/uprintf/ufs_uprintf.c
72
fd = open(BLOCKS_FILENAME, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/test/stress2/lib/resources.c
167
O_CREAT | O_TRUNC | O_WRONLY |
tools/test/stress2/lib/resources.c
187
O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1) {
tools/test/stress2/testcases/lockf/lockf.c
139
if ((fd = open(file,O_CREAT | O_TRUNC | O_RDWR, 0600)) == -1) {
tools/test/stress2/testcases/lockf2/lockf2.c
84
if ((fd = open(file,O_CREAT | O_TRUNC | O_RDWR, 0600)) == -1)
tools/test/stress2/testcases/mmap/mmap.c
112
if ((fdout = open(file, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0)
tools/test/stress2/testcases/openat/doat.c
155
i = open("tmp/foo", O_RDONLY | O_CREAT, 0644);
tools/test/stress2/testcases/openat/doat.c
492
tests[9].tests[4].params[2].i = O_RDONLY | O_CREAT;
tools/test/stress2/testcases/openat/openat.c
124
if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1)
tools/test/stress2/testcases/openat/openat.c
146
if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1)
tools/test/stress2/testcases/openat/openat.c
171
if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1)
tools/test/stress2/testcases/rename/rename.c
100
if ((tfd = open(file1, O_RDONLY|O_CREAT, 0660)) == -1)
tools/test/stress2/tools/bench.c
106
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
135
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
168
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
200
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
240
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
75
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/serial.c
25
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0)
tools/test/upsdl/upsdl.c
54
fd = open(filename,O_CREAT | O_TRUNC | O_RDWR,S_IRWXU);
tools/tools/intel-ucode-split/intel-ucode-split.c
186
ofd = open(output_file, O_WRONLY | O_CREAT | O_TRUNC,
tools/tools/net80211/w00t/prga/prga.c
124
fd = open(p->fname, O_WRONLY | O_CREAT, 0644);
tools/tools/net80211/wesside/wesside/wesside.c
2094
fd = open(KEY_FILE, O_WRONLY | O_CREAT, 0644);
tools/tools/net80211/wesside/wesside/wesside.c
2411
weplog.fd = open(WEP_FILE, O_WRONLY | O_CREAT,
tools/tools/net80211/wesside/wesside/wesside.c
855
fd = open(PRGA_FILE, O_WRONLY | O_CREAT,
tools/tools/net80211/wesside/wesside/wesside.c
969
fd = open(path, O_WRONLY | O_CREAT, 0644);
tools/tools/pciroms/pciroms.c
317
if ((fd = open(filename, O_CREAT|O_RDWR|O_TRUNC|O_NOFOLLOW,
tools/tools/syscall_timing/syscall_timing.c
1119
fd = open(tmp_path, O_WRONLY | O_CREAT, 0700);
tools/tools/syscall_timing/syscall_timing.c
162
fd = open(path, O_RDWR | O_CREAT, 0600);
tools/tools/syscall_timing/syscall_timing.c
170
fd = open(path, O_RDWR | O_CREAT, 0600);
tools/tools/syscall_timing/syscall_timing.c
698
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/syscall_timing/syscall_timing.c
704
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/syscall_timing/syscall_timing.c
719
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/syscall_timing/syscall_timing.c
743
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
usr.bin/at/at.c
245
if ((lockdes = open(LFILE, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR)) < 0)
usr.bin/bintrans/uudecode.c
268
flags = O_WRONLY | O_CREAT | O_EXCL;
usr.bin/bsdiff/bspatch/bspatch.c
147
O_CREAT | O_TRUNC | O_WRONLY | O_BINARY, 0666)) < 0)
usr.bin/cap_mkdb/cap_mkdb.c
109
if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR,
usr.bin/dtc/dtc.cc
185
outfile = open(optarg, O_CREAT | O_TRUNC | O_WRONLY, 0666);
usr.bin/dtc/dtc.cc
216
depfile = fdopen(open(optarg, O_CREAT | O_TRUNC | O_WRONLY, 0666), "w");
usr.bin/gcore/gcore.c
81
fd = open(corefile, O_RDWR | O_CREAT | O_TRUNC, DEFFILEMODE);
usr.bin/gencat/gencat.c
176
if ((ofd = open(catfile, O_WRONLY | O_TRUNC | O_CREAT, 0666)) < 0)
usr.bin/gzip/gzip.c
1316
out = open(outfile, O_WRONLY | O_CREAT | O_EXCL, 0600);
usr.bin/gzip/gzip.c
1492
zfd = open(outfile, O_WRONLY|O_CREAT|O_EXCL, 0600);
usr.bin/indent/indent.c
1249
bakfd = open(bakfile, O_RDWR | O_CREAT | O_TRUNC, 0600);
usr.bin/kdump/kdump.c
936
if ((ip[0] & O_CREAT) == O_CREAT) {
usr.bin/ktrace/ktrace.c
136
if ((fd = open(tracefile, O_CREAT | O_WRONLY | O_NONBLOCK,
usr.bin/ktrace/ktrace.c
147
if ((fd = open(tracefile, O_CREAT | O_EXCL | O_WRONLY,
usr.bin/lockf/lockf.c
114
flags = O_CREAT | O_RDONLY;
usr.bin/lockf/lockf.c
122
flags &= ~O_CREAT;
usr.bin/lockf/lockf.c
334
else if (errno == ENOENT && (flags & O_CREAT) == 0) {
usr.bin/mail/main.c
129
if ((i = open(Tflag, O_CREAT | O_TRUNC | O_WRONLY,
usr.bin/mail/quit.c
225
if ((fd = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >= 0)
usr.bin/mail/v7.local.c
68
if ((fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600)) >=
usr.bin/mkimg/mkimg.c
612
outfd = open(optarg, O_WRONLY | O_CREAT | O_TRUNC,
usr.bin/mkuzip/mkuzip.c
300
cfs.fdw = open(oname, (cfs.en_dedup ? O_RDWR : O_WRONLY) | O_TRUNC | O_CREAT,
usr.bin/msgs/msgs.c
771
fd = open(fname, O_RDWR|O_EXCL|O_CREAT|O_APPEND);
usr.bin/nohup/nohup.c
103
fd = open(p = path, O_RDWR | O_CREAT | O_APPEND,
usr.bin/nohup/nohup.c
97
fd = open(p, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
usr.bin/patch/inp.c
295
if ((tifd = open(TMPINNAME, O_EXCL | O_CREAT | O_WRONLY, 0666)) < 0)
usr.bin/patch/util.c
169
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
usr.bin/posixmqcontrol/posixmqcontrol.c
451
flags |= O_CREAT;
usr.bin/posixshmcontrol/posixshmcontrol.c
67
fd = shm_open(path, O_RDWR | O_CREAT, mode);
usr.bin/script/script.c
200
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC,
usr.bin/sed/compile.c
285
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/compile.c
746
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/process.c
241
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/process.c
477
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, DEFFILEMODE)) == -1)
usr.bin/split/split.c
356
int flags = O_WRONLY | O_CREAT | O_TRUNC;
usr.bin/tcopy/tcopy.cc
338
fd = open(name, O_RDWR|O_CREAT, DEFFILEMODE);
usr.bin/tcopy/tcopy.cc
467
fd = open(arg, O_RDWR|O_CREAT, DEFFILEMODE);
usr.bin/tee/tee.c
92
oflags = O_WRONLY | O_CREAT;
usr.bin/tip/tip/uucplock.c
62
fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660);
usr.bin/touch/touch.c
165
O_WRONLY | O_CREAT, DEFFILEMODE);
usr.bin/truncate/truncate.c
149
oflags = O_WRONLY | O_CREAT;
usr.bin/usbhidaction/usbhidaction.c
169
fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH);
usr.sbin/acpi/acpidb/acpidb.c
427
fd = open(filetmp, O_WRONLY | O_CREAT | O_TRUNC, mode);
usr.sbin/acpi/acpidump/acpi.c
2894
fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, mode);
usr.sbin/acpi/acpidump/acpi.c
2933
fd = open(tmpstr, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
usr.sbin/bhyve/snapshot.c
1234
kdata_fd = openat(fddir, kdata_filename, O_WRONLY | O_CREAT | O_TRUNC, 0700);
usr.sbin/bhyve/snapshot.c
1241
fd_checkpoint = openat(fddir, checkpoint_file, O_RDWR | O_CREAT | O_TRUNC, 0700);
usr.sbin/bhyve/snapshot.c
1255
fd_meta = openat(fddir, meta_filename, O_WRONLY | O_CREAT | O_TRUNC, 0700);
usr.sbin/bluetooth/hcsecd/parser.y
361
if ((f = open(tmp, O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0600)) < 0) {
usr.sbin/boot0cfg/boot0cfg.c
200
write_mbr(fpath, O_CREAT | O_TRUNC, mbr, mbr_size, 0);
usr.sbin/btxld/btxld.c
252
if ((fdo = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1)
usr.sbin/camdd/camdd.c
3285
O_RDWR | O_CREAT, S_IWUSR |S_IRUSR);
usr.sbin/certctl/certctl.c
512
O_CREAT | O_WRONLY | O_TRUNC, mode);
usr.sbin/certctl/certctl.c
525
O_CREAT | O_WRONLY | O_EXCL, mode);
usr.sbin/certctl/certctl.c
596
fd = openat(d, tmpfile, O_WRONLY | O_CREAT | O_EXCL, mode);
usr.sbin/cron/lib/misc.c
399
LogFD = open(LOG_FILE, O_WRONLY|O_APPEND|O_CREAT, 0600);
usr.sbin/crunch/crunchgen/crunchgen.c
723
if ((fd = open(tempfname, O_CREAT | O_EXCL | O_RDWR, 0600)) == -1) {
usr.sbin/ctladm/ctladm.c
1739
file_fd = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
usr.sbin/cxgbetool/cxgbetool.c
2294
fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY,
usr.sbin/daemon/daemon.c
775
return open(outfn, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, outfm);
usr.sbin/edquota/edquota.c
372
if ((qf = quota_open(fs, quotatype, O_CREAT|O_RDWR)) == NULL) {
usr.sbin/extattrctl/extattrctl.c
97
flags = O_CREAT | O_WRONLY | O_TRUNC | O_EXCL;
usr.sbin/fifolog/lib/fifolog_create.c
54
fd = open(fn, O_WRONLY | O_TRUNC | O_EXCL | O_CREAT, 0644);
usr.sbin/fwcontrol/fwdv.c
107
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
usr.sbin/fwcontrol/fwmpegts.c
165
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
usr.sbin/ipfwpcap/ipfwpcap.c
93
fd = open(pidfile, O_WRONLY|O_CREAT|O_EXCL, 0644);
usr.sbin/jail/command.c
704
open(conslog, O_WRONLY | O_CREAT | O_APPEND, DEFFILEMODE);
usr.sbin/lpr/common_source/common.c
423
fd = open(lfname, O_WRONLY|O_CREAT, newbits);
usr.sbin/lpr/common_source/ctlinfo.c
485
newfd = open(tfname2, O_WRONLY|O_CREAT|O_TRUNC, 0660);
usr.sbin/lpr/lpc/cmds.c
369
fd = open(statfile, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE);
usr.sbin/lpr/lpd/lpd.c
283
lfd = open(_PATH_MASTERLOCK, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK,
usr.sbin/lpr/lpd/printjob.c
193
lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK,
usr.sbin/lpr/lpd/printjob.c
1989
fd = open(pp->status_file, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE);
usr.sbin/lpr/lpd/recvjob.c
316
fd = open(file, O_CREAT|O_EXCL|O_WRONLY, FILMOD);
usr.sbin/lpr/lpr/lpr.c
629
f = open(n, O_WRONLY | O_EXCL | O_CREAT, FILMOD);
usr.sbin/lpr/lpr/lpr.c
823
if ((fd = open(buf, O_RDWR|O_CREAT, 0664)) < 0) {
usr.sbin/makefs/ffs.c
493
int oflags = O_RDWR | O_CREAT;
usr.sbin/makefs/zfs/vdev.c
418
zfs->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0644);
usr.sbin/mpsutil/mps_flash.c
91
fd = open(firmware_file, O_CREAT | O_TRUNC | O_RDWR, 0644);
usr.sbin/mptable/mptable.c
695
ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR, 0666 );
usr.sbin/nfsd/nfsd.c
1133
stable_fd = open(NFSD_STABLERESTART, O_RDWR | O_CREAT, 0600);
usr.sbin/nfsd/nfsd.c
1146
backup_fd = open(NFSD_STABLEBACKUP, O_RDWR | O_CREAT,
usr.sbin/pmc/cmd_pmc_filter.cc
351
if ((postlogfd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC,
usr.sbin/pmcstat/pmcpl_gprof.c
133
if ((fd = open(pathname, O_RDWR|O_NOFOLLOW|O_CREAT,
usr.sbin/pw/cpdir.c
128
destfd = openat(rootfd, path, O_RDWR | O_CREAT | O_EXCL,
usr.sbin/pw/pw.c
181
O_WRONLY | O_APPEND | O_CREAT | O_CLOEXEC,
usr.sbin/pw/pw_conf.c
421
if ((fd = open(file, O_CREAT|O_RDWR|O_TRUNC|O_EXLOCK, 0644)) == -1)
usr.sbin/pw/pw_log.c
55
fd = open(cnf->logfile, O_WRONLY | O_CREAT | O_APPEND, 0600);
usr.sbin/pw/pw_user.c
1489
close(openat(conf.rootfd, path +1, O_RDWR | O_CREAT, 0600));
usr.sbin/pwd_mkdb/pwd_mkdb.c
274
O_RDWR|O_CREAT|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo);
usr.sbin/pwd_mkdb/pwd_mkdb.c
280
O_RDWR|O_CREAT|O_EXCL, PERM_SECURE, DB_HASH, &openinfo);
usr.sbin/pwd_mkdb/pwd_mkdb.c
299
O_WRONLY|O_CREAT|O_EXCL, PERM_INSECURE)) < 0)
usr.sbin/pwd_mkdb/pwd_mkdb.c
581
if ((to_fd = open(to, O_WRONLY|O_CREAT|O_EXCL, mode)) < 0)
usr.sbin/rpc.statd/file.c
182
status_fd = open(filename, O_RDWR | O_CREAT, 0644);
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
426
#define FLAGS O_RDWR|O_CREAT
usr.sbin/rpcbind/rpcbind.c
170
if ((rpcbindlockfd = open(RPCBINDDLOCK, O_RDONLY|O_CREAT, 0444)) < 0)
usr.sbin/rwhod/rwhod.c
397
whod = openat(dirfd, path, O_WRONLY | O_CREAT, 0644);
usr.sbin/sa/db.c
154
if ((ddb = dbopen(dbname, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/services_mkdb/services_mkdb.c
142
db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL,
usr.sbin/syslogd/syslogd.c
547
logflags |= O_CREAT;
usr.sbin/tzsetup/tzsetup.c
967
O_WRONLY | O_CREAT | O_TRUNC,
usr.sbin/uhsoctl/uhsoctl.c
460
fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW, 0666);
usr.sbin/usbdump/usbdump.c
758
p->wfd = open(w_arg, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR);
usr.sbin/usbdump/usbdump.c
905
p->bfd = open(b_arg, O_CREAT | O_TRUNC |
usr.sbin/virtual_oss/virtual_oss/main.c
2596
int pidfile = open(voss_pid_path, O_RDWR | O_CREAT | O_TRUNC, 0600);
usr.sbin/yp_mkdb/yp_mkdb.c
192
if ((dbp = open_db(map, O_RDWR|O_EXLOCK|O_EXCL|O_CREAT)) == NULL)
usr.sbin/ypbind/ypbind.c
395
if ((yplockfd = (open(YPBINDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
usr.sbin/ypbind/ypbind.c
933
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
935
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1)
usr.sbin/ypbind/ypbind.c
939
if ((fd = open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
941
if ((fd = open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1)