bin/cp/utils.c
192
O_WRONLY | O_TRUNC | (beneath ? O_RESOLVE_BENEATH : 0), 0);
bin/cp/utils.c
196
O_WRONLY | O_TRUNC | O_CREAT |
bin/dd/dd.c
180
oflags |= O_TRUNC;
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/sh/redir.c
207
if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 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/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/lib/hdb/db3.c
264
if (flags & O_TRUNC)
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
134
fd = open (log_context->log_file, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/lib/krb5/log.c
317
O_TRUNC | O_APPEND, 0666);
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/ndbm_wrap.c
171
if (flags & O_TRUNC)
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
557
database_fd = open(temp_file_name, O_WRONLY | O_CREAT | O_TRUNC, 0600);
crypto/krb5/src/lib/krb5/ccache/t_marshal.c
374
fd = open(filename, O_CREAT|O_TRUNC|O_RDWR, 0700);
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/libdb2/db/db.c
55
O_RDWR | O_SHLOCK | O_TRUNC | O_BINARY)
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
123
if (!file || (flags & O_TRUNC) ||
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/tcreat3.c
75
O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0600, 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/openssh/authfile.c
500
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
crypto/openssh/sftp-client.c
1651
((resume_flag || inplace_flag) ? 0 : O_TRUNC), mode | S_IWUSR);
crypto/openssh/sftp-server.c
272
flags |= O_TRUNC;
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/openssl/apps/lib/apps.c
3105
#ifdef O_TRUNC
crypto/openssl/apps/lib/apps.c
3106
mode |= O_TRUNC;
lib/geom/eli/geom_eli.c
1736
filefd = open(file, O_WRONLY | O_TRUNC | O_CREAT, 0600);
lib/geom/eli/geom_eli.c
692
fd = open(prov, O_WRONLY | O_TRUNC);
lib/libc/db/db/db.c
60
O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
lib/libc/db/test/dbtest.c
105
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
lib/libc/db/test/hash.tests/tcreat3.c
63
O_CREAT|O_TRUNC|O_RDWR, 0600, DB_HASH, &ctl))){
lib/libc/gen/pututxline.c
183
fd = _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644);
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/freopen.c
112
if (oflags & O_TRUNC)
lib/libc/sys/creat.c
47
O_WRONLY | O_CREAT | O_TRUNC, mode));
lib/libc/tests/gen/dlopen_empty_test.c
67
fd = open(soname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE);
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/stdtime/detect_tz_changes_test.c
78
ATF_REQUIRE((dfd = open(tfn, O_CREAT | O_TRUNC | O_WRONLY, 0644)) >= 0);
lib/libpmcstat/libpmcstat_logging.c
508
O_RDONLY : (O_WRONLY|O_CREAT|O_TRUNC),
lib/libprocstat/libprocstat.c
1636
{ O_TRUNC, PS_FST_FFLAG_TRUNC }
lib/libsecureboot/openpgp/dearmor.c
123
if ((fd = open(outfile, O_WRONLY|O_CREAT|O_TRUNC)) < 0)
lib/libutil/flopen.c
68
trunc = (flags & O_TRUNC);
lib/libutil/flopen.c
69
flags &= ~O_TRUNC;
lib/libutil/pidfile.c
174
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
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/uucplock.c
75
if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
libexec/phttpget/phttpget.c
597
fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY, 0644);
libexec/tftpd/tftpd.c
778
O_WRONLY | O_TRUNC | O_CREAT,
libexec/tftpd/tftpd.c
783
fd = open(filename, O_WRONLY | O_TRUNC);
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/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
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
140
bsd_flags |= O_TRUNC;
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/tcp_log/tcp_log_dev.c
199
if (flags & (FWRITE | FEXEC | FAPPEND | O_TRUNC))
sys/fs/unionfs/union_subr.c
1289
fmode = FFLAGS(O_WRONLY | O_CREAT | O_TRUNC | O_EXCL);
sys/fs/unionfs/union_vnops.c
695
!(ap->a_mode & O_TRUNC), cred, td);
sys/kern/kern_descrip.c
4741
{ O_TRUNC, KF_FLAG_TRUNC }
sys/kern/uipc_shm.c
1161
if ((flags & ~(O_ACCMODE | O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC |
sys/kern/uipc_shm.c
1327
(flags & (O_ACCMODE | O_TRUNC)) ==
sys/kern/uipc_shm.c
1328
(O_RDWR | O_TRUNC)) {
sys/kern/vfs_syscalls.c
1107
if (!(flags & (O_APPEND | O_TRUNC)))
sys/kern/vfs_syscalls.c
1116
if (flags & O_TRUNC)
sys/kern/vfs_syscalls.c
1301
if (flags & O_TRUNC) {
sys/kern/vfs_syscalls.c
1382
O_WRONLY | O_CREAT | O_TRUNC, uap->mode));
sys/kern/vfs_syscalls.c
4810
if ((flags & O_TRUNC) != 0) {
sys/kern/vfs_vnops.c
341
fmode &= ~O_TRUNC;
sys/kern/vfs_vnops.c
455
if ((fmode & (FWRITE | O_TRUNC)) != 0) {
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
68
{ (O_RDONLY | O_CREAT | O_TRUNC), AUE_OPEN_RTC },
sys/security/audit/audit_bsm_klib.c
69
{ (O_RDONLY | O_TRUNC), AUE_OPEN_RT },
sys/security/audit/audit_bsm_klib.c
72
{ (O_RDWR | O_CREAT | O_TRUNC), AUE_OPEN_RWTC },
sys/security/audit/audit_bsm_klib.c
73
{ (O_RDWR | O_TRUNC), AUE_OPEN_RWT },
sys/security/audit/audit_bsm_klib.c
76
{ (O_WRONLY | O_CREAT | O_TRUNC), AUE_OPEN_WTC },
sys/security/audit/audit_bsm_klib.c
77
{ (O_WRONLY | O_TRUNC), AUE_OPEN_WT },
sys/security/audit/audit_bsm_klib.c
83
{ (O_RDONLY | O_CREAT | O_TRUNC), AUE_OPENAT_RTC },
sys/security/audit/audit_bsm_klib.c
84
{ (O_RDONLY | O_TRUNC), AUE_OPENAT_RT },
sys/security/audit/audit_bsm_klib.c
87
{ (O_RDWR | O_CREAT | O_TRUNC), AUE_OPENAT_RWTC },
sys/security/audit/audit_bsm_klib.c
88
{ (O_RDWR | O_TRUNC), AUE_OPENAT_RWT },
sys/security/audit/audit_bsm_klib.c
91
{ (O_WRONLY | O_CREAT | O_TRUNC), AUE_OPENAT_WTC },
sys/security/audit/audit_bsm_klib.c
92
{ (O_WRONLY | O_TRUNC), AUE_OPENAT_WT },
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
1435
ATF_REQUIRE_EQ(-1, shm_open(path, O_TRUNC | O_RDWR, 0600));
tests/sys/audit/inter-process.c
1458
ATF_REQUIRE(shm_open(dirpath, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1);
tests/sys/audit/open.c
161
OPEN_AT_TC_DEFINE(read_trunc, "read,trunc", O_RDONLY | O_TRUNC, "fr")
tests/sys/audit/open.c
163
| O_TRUNC, "fr")
tests/sys/audit/open.c
166
OPEN_AT_TC_DEFINE(write_trunc, "write,trunc", O_WRONLY | O_TRUNC, "fw")
tests/sys/audit/open.c
168
| O_TRUNC, "fw")
tests/sys/audit/open.c
171
OPEN_AT_TC_DEFINE(read_write_trunc, "read,write,trunc", O_RDWR | O_TRUNC, "fr")
tests/sys/audit/open.c
173
O_CREAT | O_TRUNC, "fw")
tests/sys/capsicum/capability-fd.cc
712
rc = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDONLY);
tests/sys/capsicum/capability-fd.cc
717
rc = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_WRONLY);
tests/sys/capsicum/capability-fd.cc
722
rc = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDWR);
tests/sys/cddl/zfs/bin/file_trunc.c
80
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/sys/cddl/zfs/bin/mkfile.c
44
#define MKFILE_FLAG (O_WRONLY | O_CREAT | O_TRUNC)
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/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/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
262
test_ok(O_WRONLY | O_TRUNC, O_WRONLY | O_TRUNC);
tests/sys/kern/ktrace_test.c
125
O_RDONLY | O_CREAT | O_TRUNC, 0600)) != -1);
tests/sys/kern/socket_msg_trunc.c
180
fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644);
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
713
fd = shm_open(test_path, O_RDWR | O_TRUNC, 0777);
tests/sys/vfs/lookup_cap_dotdot.c
47
ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
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/security/cap_test/cap_test_capabilities.c
239
ret = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDONLY);
tools/regression/security/cap_test/cap_test_capabilities.c
240
CHECK_RESULT(openat(O_TRUNC | O_RDONLY),
tools/regression/security/cap_test/cap_test_capabilities.c
243
ret = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_WRONLY);
tools/regression/security/cap_test/cap_test_capabilities.c
244
CHECK_RESULT(openat(O_TRUNC | O_WRONLY),
tools/regression/security/cap_test/cap_test_capabilities.c
247
ret = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDWR);
tools/regression/security/cap_test/cap_test_capabilities.c
248
CHECK_RESULT(openat(O_TRUNC | O_RDWR),
tools/regression/security/open_to_operation/open_to_operation.c
118
O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC };
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/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/pciroms/pciroms.c
317
if ((fd = open(filename, O_CREAT|O_RDWR|O_TRUNC|O_NOFOLLOW,
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/indent/indent.c
1249
bakfd = open(bakfile, O_RDWR | O_CREAT | O_TRUNC, 0600);
usr.bin/lockf/lockf.c
138
flags |= O_TRUNC;
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/patch/util.c
169
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
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/tee/tee.c
96
oflags |= O_TRUNC;
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/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/certctl/certctl.c
512
O_CREAT | O_WRONLY | O_TRUNC, mode);
usr.sbin/cxgbetool/cxgbetool.c
2294
fd = open(fname, O_CREAT | O_TRUNC | O_EXCL | O_WRONLY,
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/lpr/common_source/ctlinfo.c
485
newfd = open(tfname2, O_WRONLY|O_CREAT|O_TRUNC, 0660);
usr.sbin/lpr/lpd/printjob.c
1406
errfd = open(tempstderr, O_WRONLY|O_TRUNC, 0664);
usr.sbin/lpr/lpd/printjob.c
813
n = open(tempstderr, O_WRONLY|O_TRUNC, 0664);
usr.sbin/makefs/ffs.c
501
oflags |= O_TRUNC;
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/pmc/cmd_pmc_filter.cc
351
if ((postlogfd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC,
usr.sbin/ppp/ipcp.c
338
if ((fd = ID0open(_PATH_RESCONF, O_WRONLY|O_TRUNC, 0644)) != -1) {
usr.sbin/pw/pw_conf.c
421
if ((fd = open(file, O_CREAT|O_RDWR|O_TRUNC|O_EXLOCK, 0644)) == -1)
usr.sbin/sa/db.c
154
if ((ddb = dbopen(dbname, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/tzsetup/tzsetup.c
967
O_WRONLY | O_CREAT | O_TRUNC,
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/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)