Symbol: O_TRUNC
bin/cp/utils.c
103
to_fd = open(to.p_path, O_WRONLY | O_TRUNC);
bin/cp/utils.c
105
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
bin/csh/csh.c
848
if ((fd = open(short2str(hfile), O_WRONLY | O_CREAT | O_TRUNC,
bin/csh/sem.c
571
if ((fd = open(tmp, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1)
bin/dd/dd.c
114
(O_CREAT | (ddflags & (C_SEEK | C_NOTRUNC) ? 0 : O_TRUNC))
bin/ksh/exec.c
1078
flags = O_WRONLY | O_CREAT | O_TRUNC;
bin/mv/cp.c
447
to_fd = open(to.p_path, O_WRONLY | O_TRUNC);
bin/mv/cp.c
449
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
bin/mv/mv.c
283
if ((to_fd = open(to, O_CREAT | O_TRUNC | O_WRONLY, 0600)) == -1) {
bin/pax/ar_io.c
60
#define AR_MODE (O_WRONLY | O_CREAT | O_TRUNC) /* mode for archive */
bin/pax/file_subs.c
106
if ((fd = open(arcn->name, O_WRONLY | O_CREAT | O_TRUNC,
distrib/special/libstubs/db.c
51
O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC)
games/backgammon/common_source/save.c
102
O_CREAT | O_TRUNC | O_WRONLY,
games/backgammon/common_source/save.c
89
O_CREAT | O_TRUNC | O_WRONLY,
games/hack/hack.bones.c
134
if((fd = open(bones, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) == -1) return;
games/hack/hack.do.c
197
fd = open(lock, O_CREAT | O_TRUNC | O_WRONLY, FMASK);
games/hack/hack.save.c
104
if((fd = open(SAVEF, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) == -1) {
games/hack/hack.save.c
196
if((nfd = open(lock, O_CREAT | O_TRUNC | O_WRONLY, FMASK)) == -1)
games/hack/hack.unix.c
246
fd = open(lock, O_CREAT | O_TRUNC | O_WRONLY, FMASK);
games/mille/save.c
111
if ((outf = open(buf, O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1) {
games/phantasia/setup.c
123
if ((fd = open(path, O_CREAT | O_TRUNC | O_WRONLY, 0660)) == -1)
lib/libc/compat-43/creat.c
36
return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
lib/libc/db/db/db.c
51
O_ACCMODE | O_SHLOCK | O_SYNC | O_TRUNC)
lib/libc/gen/shm_open.c
36
(O_CREAT | O_EXCL | O_TRUNC | O_CLOEXEC | O_CLOFORK | O_NOFOLLOW)
lib/libc/gmon/gmon.c
375
log = open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0664);
lib/libc/stdio/flags.c
61
o = O_CREAT | O_TRUNC;
lib/libc/stdio/fmemopen.c
151
st->len = (oflags & O_TRUNC) ? 0 : size;
lib/libc/stdio/fmemopen.c
166
if (oflags & O_TRUNC)
lib/libutil/uucplock.c
73
tmpfd = open(lcktmpname, O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0664);
lib/libz/gzlib.c
243
O_TRUNC :
libexec/tradcpp/output.c
54
outputfd = open(mode.output_file, O_WRONLY|O_CREAT|O_TRUNC,
regress/lib/libc/db/dbtest.c
104
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
regress/lib/libc/sys/t_getrusage.c
142
fd = open(DUMP_FILE, O_WRONLY|O_CREAT|O_TRUNC, 0222);
regress/lib/libsndio/fd/fd.c
301
recfd = open(recpath, O_CREAT | O_WRONLY | O_TRUNC, 0666);
regress/sys/dev/video/videotest.c
407
fd2 = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0644);
regress/sys/ffs/fstest.c
115
{ O_TRUNC, "O_TRUNC" },
regress/sys/kern/mmap3/mmaptest.c
50
fd = open("test.out", O_WRONLY|O_CREAT|O_TRUNC, 0600);
regress/sys/kern/open/open.c
32
fd = open(path, O_WRONLY | O_TRUNC | O_SHLOCK);
regress/sys/kern/unfdpass/unfdpass.c
105
if ((fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) == -1)
regress/sys/nfs/mmap-sysctl-copyin.c
41
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0777)) == -1)
regress/sys/nfs/mmap-sysctl-copyout.c
42
if ((fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0777)) == -1)
regress/sys/uvm/mmap_4g/mmap_4g.c
29
fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, 0666);
regress/sys/uvm/vnode/test-deadlock.c
95
fd = open(path, O_RDWR | O_TRUNC);
regress/usr.sbin/rpki-client/test-http.c
159
if ((outfd = open(file, O_WRONLY|O_CREAT|O_TRUNC, 0666)) == -1)
sbin/isakmpd/monitor.c
252
O_TRUNC;
sbin/resolvd/resolvd.c
587
if ((fd = open(_PATH_RESCONF_NEW, O_CREAT|O_TRUNC|O_RDWR, 0644)) == -1) {
sbin/restore/dirs.c
646
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
sbin/restore/tape.c
640
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
442
ofd = open(path, O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
517
ofd = open(path, O_WRONLY | O_CREAT | O_TRUNC,
sbin/shutdown/shutdown.c
585
if ((fastfd = open(_PATH_FASTBOOT, O_WRONLY|O_CREAT|O_TRUNC,
sbin/shutdown/shutdown.c
606
if ((logfd = open(_PATH_NOLOGIN, O_WRONLY|O_CREAT|O_TRUNC,
sys/arch/hppa/stand/mkboot/mkboot.c
108
if ((to = open(to_file, O_RDWR | O_TRUNC | O_CREAT, 0644)) < 0)
sys/dev/microcode/afb/build.c
37
fd = open(AFB_FW_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/atmel/build.c
40
fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/bnx/build.c
128
fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/bwi/build/build.c
96
if ((fdout = open(FILENAME, O_CREAT|O_TRUNC|O_RDWR, 0644)) == -1)
sys/dev/microcode/bwi/extract/extract.c
77
if ((fdout = open(h[i]->filename, O_CREAT|O_TRUNC|O_RDWR, 0644))
sys/dev/microcode/cirruslogic/build.c
34
fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/fxp/build.c
49
fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/kue/build.c
59
fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/neomagic/build.c
37
fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/ral/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/rsu/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/rtwn/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/rum/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/tht/build.c
37
fd = open(THT_FW_NAME, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/tigon/build.c
89
fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/tusb3410/build.c
35
fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/typhoon/build.c
46
fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/urtwn/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/yds/build.c
75
fd = open(FILENAME, O_WRONLY|O_CREAT|O_TRUNC, 0644);
sys/dev/microcode/zydas/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/pci/if_qwx_pci.c
3545
error = vn_open(&nd, FWRITE | O_CREAT | O_NOFOLLOW | O_TRUNC,
sys/dev/pci/if_qwz_pci.c
3409
error = vn_open(&nd, FWRITE | O_CREAT | O_NOFOLLOW | O_TRUNC,
sys/kern/vfs_syscalls.c
1150
if ((flags & O_TRUNC) && (flags & (O_EXLOCK | O_SHLOCK))) {
sys/kern/vfs_syscalls.c
1152
flags &= ~O_TRUNC; /* Must do truncate ourselves */
sys/kern/vfs_syscalls.c
1433
if (flags & (FWRITE | O_TRUNC)) {
sys/kern/vfs_syscalls.c
1442
if (flags & O_TRUNC) {
sys/kern/vfs_vnops.c
100
if ((fmode & (O_TRUNC | FWRITE)) == O_TRUNC)
sys/kern/vfs_vnops.c
123
fmode &= ~O_TRUNC;
sys/kern/vfs_vnops.c
177
if ((fmode & O_TRUNC) && vp->v_type == VREG) {
sys/miscfs/fuse/fuse_vnops.c
283
flags = OFLAGS(ap->a_mode) & ~(O_CREAT|O_EXCL|O_TRUNC);
sys/ufs/ufs/ufs_vnops.c
210
if (ap->a_mode & O_TRUNC)
usr.bin/aucat/afile.c
867
O_WRONLY | O_TRUNC | O_CREAT, 0666);
usr.bin/cap_mkdb/cap_mkdb.c
107
if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR,
usr.bin/cdio/rip.c
434
info->fd = open(info->name, O_CREAT | O_TRUNC | O_RDWR,
usr.bin/compress/main.c
536
fd = open(out, O_WRONLY|O_CREAT|O_TRUNC, S_IWUSR);
usr.bin/ctfconv/generate.c
414
fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
usr.bin/cvs/buf.c
216
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1) {
usr.bin/cvs/checkout.c
524
O_CREAT | O_RDWR | O_TRUNC);
usr.bin/cvs/client.c
1118
O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1) {
usr.bin/cvs/client.c
1137
O_RDWR | O_CREAT | O_TRUNC, 0644)) == -1) {
usr.bin/cvs/client.c
771
if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1)
usr.bin/cvs/client.c
850
if ((fd = open(fpath, O_CREAT | O_WRONLY | O_TRUNC)) == -1)
usr.bin/cvs/diff3.c
243
cf->fd = open(cf->file_path, O_CREAT | O_RDWR | O_TRUNC, 0644);
usr.bin/cvs/file.c
1096
if ((dst = open(to, O_CREAT|O_TRUNC|O_WRONLY,
usr.bin/cvs/repository.c
85
if ((i = open(fpath, O_WRONLY|O_CREAT|O_TRUNC, 0755)) == -1) {
usr.bin/cvs/server.c
420
if ((fd = open(fpath, O_WRONLY | O_CREAT | O_TRUNC)) == -1)
usr.bin/ftp/fetch.c
1020
out = open(savefile, O_CREAT | O_WRONLY | O_TRUNC,
usr.bin/ftp/fetch.c
225
out = open(savefile, O_CREAT | O_WRONLY | O_TRUNC, 0666);
usr.bin/gencat/gencat.c
163
if ((ofd = open(catfile, O_WRONLY | O_TRUNC | O_CREAT, 0666)) == -1)
usr.bin/indent/indent.c
1311
bakchn = open(bakfile, O_CREAT | O_TRUNC | O_WRONLY, 0600);
usr.bin/less/edit.c
643
logfile = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0644);
usr.bin/mail/quit.c
225
if ((fdx = open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600)) != -1)
usr.bin/mail/v7.local.c
77
fd = open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600);
usr.bin/mg/fileio.c
107
fd = open(fn, O_RDWR | O_CREAT | O_TRUNC, fmode);
usr.bin/mg/fileio.c
398
if ((ofd = open(toname, O_WRONLY|O_CREAT|O_TRUNC, fmode)) == -1) {
usr.bin/midicat/midicat.c
102
ofd = open(ofile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
usr.bin/patch/inp.c
162
if ((fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0666)) != -1)
usr.bin/patch/util.c
157
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
usr.bin/rcs/buf.c
281
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1) {
usr.bin/rcs/co.c
472
if ((fd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1)
usr.bin/rsync/copy.c
82
O_WRONLY | O_NOFOLLOW | O_TRUNC | O_CREAT | O_EXCL,
usr.bin/sed/compile.c
271
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/compile.c
597
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/process.c
227
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/process.c
428
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, DEFFILEMODE)) == -1)
usr.bin/signify/signify.c
449
fd = xopen(sigfile, O_CREAT|O_TRUNC|O_NOFOLLOW|O_WRONLY, 0666);
usr.bin/signify/signify.c
583
fd = xopen(msgfile, O_CREAT|O_TRUNC|O_NOFOLLOW|O_WRONLY, 0666);
usr.bin/signify/zsig.c
224
fdout = xopen(msgfile, O_CREAT|O_TRUNC|O_NOFOLLOW|O_WRONLY, 0666);
usr.bin/signify/zsig.c
294
fdout = xopen(sigfile, O_CREAT|O_TRUNC|O_NOFOLLOW|O_WRONLY, 0666);
usr.bin/skeyinit/skeyinit.c
280
O_RDWR | O_NONBLOCK | O_CREAT | O_TRUNC |O_NOFOLLOW,
usr.bin/ssh/authfile.c
484
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
usr.bin/ssh/sftp-client.c
1627
((resume_flag || inplace_flag) ? 0 : O_TRUNC), mode | S_IWUSR);
usr.bin/ssh/sftp-server.c
262
flags |= O_TRUNC;
usr.bin/ssh/sftp-server.c
751
(flags & (O_CREAT|O_TRUNC)) != 0)) {
usr.bin/ssh/ssh-keygen.c
2564
if ((wfd = open(wfile, O_WRONLY|O_CREAT|O_TRUNC,
usr.bin/ssh/sshbuf-io.c
103
if ((fd = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0644)) == -1)
usr.bin/tee/tee.c
103
(append ? O_APPEND : O_TRUNC), DEFFILEMODE)) == -1) {
usr.bin/tftp/main.c
456
fd = open(cp, O_CREAT | O_TRUNC | O_WRONLY, 0644);
usr.bin/tftp/main.c
468
fd = open(cp, O_CREAT | O_TRUNC | O_WRONLY, 0644);
usr.bin/tmux/cmd-save-buffer.c
115
flags = O_TRUNC;
usr.bin/tmux/tty.c
89
tty_log_fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0644);
usr.bin/vacation/vacation.c
147
flags = O_CREAT|O_RDWR|O_TRUNC;
usr.bin/vi/common/exf.c
1104
flags = O_TRUNC;
usr.bin/vi/common/exf.c
819
(LF_ISSET(FS_APPEND) ? O_APPEND : O_TRUNC);
usr.bin/vi/ex/ex_mkexrc.c
64
if ((fd = open(fname, O_CREAT | O_TRUNC | O_WRONLY,
usr.sbin/acme-client/chngproc.c
120
fd = open(fs[fsz - 1], O_WRONLY|O_CREAT|O_TRUNC, 0444);
usr.sbin/acpidump/acpidump.c
375
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, mode);
usr.sbin/bgpd/mrt.c
1143
O_WRONLY|O_NONBLOCK|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
usr.sbin/config/exec_elf.c
143
if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0700)) == -1)
usr.sbin/crunchgen/mangle.c
96
key_fd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0666);
usr.sbin/dev_mkdb/dev_mkdb.c
96
db = dbopen(dbtmp, O_CREAT|O_EXLOCK|O_RDWR|O_TRUNC,
usr.sbin/ikectl/ikeca.c
604
if ((ofd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1) {
usr.sbin/ikectl/ikeca.c
633
if ((ofd = open(dst, O_WRONLY|O_CREAT|O_TRUNC, mode)) == -1)
usr.sbin/installboot/util.c
148
fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC,
usr.sbin/kvm_mkdb/kvm_mkdb.c
188
db = dbopen(dbtemp, O_CREAT | O_EXLOCK | O_TRUNC | O_RDWR,
usr.sbin/ldomctl/ldomctl.c
371
if ((fd = open(imgfile_path, O_RDWR | O_CREAT | O_TRUNC | O_EXCL,
usr.sbin/lpd/lp.c
476
fd = open(path, O_WRONLY|O_CREAT|O_NOFOLLOW|O_NONBLOCK|O_EXLOCK|O_TRUNC,
usr.sbin/lpd/lp.c
740
fd = open(path, O_WRONLY|O_CREAT|O_NOFOLLOW|O_EXLOCK|O_TRUNC, 0660);
usr.sbin/makefs/ffs.c
488
oflags |= O_TRUNC;
usr.sbin/makefs/msdos/mkfs_msdos.c
257
oflags |= O_TRUNC;
usr.sbin/mkuboot/mkuboot.c
232
ofd = open(oname, O_RDWR | O_TRUNC | O_CREAT, 0644);
usr.sbin/nsd/nsd.c
645
if((fd = open(nsd->pidfile, O_WRONLY | O_CREAT | O_TRUNC
usr.sbin/nsd/nsd.c
685
fd = open(file, O_WRONLY | O_TRUNC
usr.sbin/pcidump/pcidump.c
207
romfd = open(romfile, O_WRONLY|O_CREAT|O_TRUNC, 0777);
usr.sbin/rdsetroot/rdsetroot.c
86
fsfd = open(fs, O_RDWR | O_CREAT | O_TRUNC, 0644);
usr.sbin/rpki-client/repo.c
1012
flags = O_WRONLY|O_CREAT|O_TRUNC;
usr.sbin/rpki-client/repo.c
404
O_WRONLY | O_CREAT | O_TRUNC | O_NOFOLLOW | O_CLOEXEC,
usr.sbin/sa/pdb.c
161
saved_pacct_db = dbopen(_PATH_SAVACCT, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/sa/usrdb.c
178
saved_usracct_db = dbopen(_PATH_USRACCT, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/smtpd/makemap.c
194
db = dbopen(dbname, O_TRUNC|O_RDWR, 0644, dbtype, NULL);
usr.sbin/tcpdump/privsep.c
451
file = open(WFileName, O_WRONLY|O_CREAT|O_TRUNC, 0666);
usr.sbin/tftpd/tftpd.c
1019
wmode = O_TRUNC;
usr.sbin/unbound/daemon/unbound.c
378
if((fd = open(pidfile, O_WRONLY | O_CREAT | O_TRUNC
usr.sbin/unbound/daemon/unbound.c
779
fd = open(daemon->pidfile, O_WRONLY | O_TRUNC
usr.sbin/vmd/vioqcow2.c
712
fd = open(imgfile_path, O_RDWR | O_CREAT | O_TRUNC | O_EXCL,
usr.sbin/vmd/vioraw.c
111
fd = open(imgfile_path, O_RDWR | O_CREAT | O_TRUNC | O_EXCL,
usr.sbin/ypbind/ypbind.c
1014
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
1016
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC,
usr.sbin/ypldap/yp.c
201
fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644);
usr.sbin/ypldap/yp.c
204
fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC,
usr.sbin/ypserv/mkalias/mkalias.c
230
new_db = ypdb_open(db_mapname, O_RDWR|O_TRUNC, 0444);