Symbol: O_TRUNC
bin/cp/utils.c
106
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
bin/cp/utils.c
111
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
bin/cp/utils.c
115
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
bin/cpdup/cpdup.c
1128
fd2 = hc_open(&DstHost, path, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
bin/cpdup/hcproto.c
698
if (flags & O_TRUNC)
bin/cpdup/hcproto.c
759
flags |= O_TRUNC;
bin/cpdup/hcproto.c
762
if (flags & (O_WRONLY | O_RDWR | O_CREAT | O_TRUNC)) {
bin/dd/dd.c
157
(O_CREAT | (ddflags & (C_SEEK | C_NOTRUNC) ? 0 : O_TRUNC))
bin/mv/mv.c
297
open(to, O_CREAT | O_EXCL | O_TRUNC | O_WRONLY, 0)) < 0) {
bin/pax/ar_io.c
61
#define AR_MODE (O_WRONLY | O_CREAT | O_TRUNC) /* mode for archive */
bin/pax/file_subs.c
108
if ((fd = open(arcn->name, O_WRONLY | O_CREAT | O_TRUNC,
bin/pax/file_subs.c
90
if ((fd = open(arcn->name, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL,
bin/sh/redir.c
220
if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
crypto/openssh/authfile.c
502
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
2635
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)
games/larn/bill.c
124
if ((fd = open(fname, O_WRONLY | O_TRUNC | O_CREAT, 0660)) == -1)
lib/libc/db/db/db.c
57
O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
lib/libc/db/test/dbtest.c
104
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
lib/libc/db/test/hash.tests/tcreat3.c
65
O_CREAT|O_TRUNC|O_RDWR, 0600, DB_HASH, &ctl))){
lib/libc/gen/creat.c
43
return(_open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
lib/libc/gmon/gmon.c
152
fd = _open(outname, O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0666);
lib/libc/gmon/gmon.c
158
log = _open("gmon.log", O_CREAT|O_TRUNC|O_WRONLY|O_CLOEXEC, 0664);
lib/libc/stdio/flags.c
71
o = O_CREAT | O_TRUNC;
lib/libc/stdio/fmemopen.c
186
if (oflags & O_TRUNC)
lib/libc/stdio/freopen.c
110
if (oflags & O_TRUNC)
lib/libthread_xu/thread/thr_sig.c
339
fd = open(buf, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0666);
lib/libutil/flopen.c
62
trunc = (flags & O_TRUNC);
lib/libutil/flopen.c
63
flags &= ~O_TRUNC;
lib/libutil/pidfile.c
125
O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NONBLOCK, mode);
lib/libutil/uucplock.c
77
if ((tmpfd = open(lcktmpname, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC,
libexec/dma/spool.c
436
fd = open(flushfn, O_CREAT|O_WRONLY|O_TRUNC, 0660);
libexec/tftpd/tftpd.c
554
fd = open(filename, mode == RRQ ? O_RDONLY : O_WRONLY|O_TRUNC);
sbin/hammer/cmd_config.c
152
fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0600);
sbin/hammer/cmd_mirror.c
1722
SFd = open(ScoreBoardFile, O_RDWR|O_CREAT|O_TRUNC, 0644);
sbin/hammer/cycle.c
80
if ((fd = open(CyclePath, O_RDWR|O_CREAT|O_TRUNC, 0666)) >= 0) {
sbin/hammer2/cmd_recover.c
1148
wfd = open(path1, O_RDWR|O_CREAT|O_TRUNC, 0600);
sbin/jscan/dump_mirror.c
612
if ((fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0600)) >= 0) {
sbin/newfs/fscopy.c
302
if ((fd = open(path, O_RDWR|O_CREAT|O_TRUNC, 0600)) < 0) {
sbin/newfs/mkfs.c
201
fd = open(filename, O_RDWR|O_TRUNC|O_CREAT, 0644);
sbin/newfs_msdos/mkfs_msdos.c
272
fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644);
sbin/rconfig/client.c
114
ffd = open(path, O_CREAT|O_TRUNC|O_RDWR, 0755);
sbin/restore/dirs.c
642
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
sbin/restore/tape.c
631
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
sbin/savecore/savecore.c
424
fdinfo = open(buf, O_WRONLY | O_CREAT | O_TRUNC, 0600);
sbin/shutdown/shutdown.c
542
if ((logfd = open(_PATH_NOLOGIN, O_WRONLY|O_CREAT|O_TRUNC,
stand/boot/pc32/btxld/btxld.c
246
if ((fdo = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1)
sys/dev/video/fb/vga.c
113
if (mode & (O_CREAT | O_APPEND | O_TRUNC))
sys/kern/kern_checkpoint.c
818
error = fp_open(buf, O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600, &fp);
sys/kern/kern_descrip.c
3311
if ((ap->a_oflags & (FWRITE|O_TRUNC)) && vp->v_type == VDIR) {
sys/kern/kern_fp.c
152
if (flags & (FWRITE | O_TRUNC)) {
sys/kern/vfs_syscalls.c
2202
if ((flags & (O_CREAT|O_TRUNC)) == 0) {
sys/kern/vfs_syscalls.c
4878
if (fmode & (FWRITE | O_TRUNC)) {
sys/kern/vfs_syscalls.c
4895
if (fmode & O_TRUNC) {
sys/kern/vfs_vnops.c
124
if ((fmode & (FWRITE | O_TRUNC)) == O_TRUNC)
sys/kern/vfs_vnops.c
139
if (fmode & O_TRUNC)
sys/kern/vfs_vnops.c
202
if ((fmode & (FWRITE | O_TRUNC)) ||
sys/kern/vfs_vnops.c
222
fmode &= ~O_TRUNC;
sys/kern/vfs_vnops.c
277
if (fmode & (FWRITE | O_TRUNC)) {
sys/kern/vfs_vnops.c
313
if (fmode & O_TRUNC) {
test/lockf/lockf.c
142
fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666);
test/stress/fsx/fsx.c
1126
fd = open(fname, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 0666);
test/stress/fsx/fsx.c
1133
fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
test/stress/stress2/lib/resources.c
158
O_CREAT | O_TRUNC | O_WRONLY | O_EXCL, 0644)) != -1)
test/stress/stress2/lib/resources.c
172
O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1) {
test/stress/stress2/testcases/lockf/lockf.c
96
if ((fd = open(file,O_CREAT | O_TRUNC | O_RDWR, 0600)) == -1)
test/stress/stress2/testcases/lockf2/lockf2.c
58
if ((fd = open(file,O_CREAT | O_TRUNC | O_RDWR, 0600)) == -1)
test/stress/stress2/testcases/mmap/mmap.c
87
if ((fdout = open(file, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0)
test/sysperf/read1.c
46
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
test/sysperf/read1.c
50
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
test/testcases/mem/mmap_madvise_1/mmap_madvise_1.c
39
fd = open(tmpfile, O_RDWR | O_CREAT | O_TRUNC, 0777);
test/unix/passdesc/passdesc.c
166
fd = open(TEST_FILENAME, O_RDWR | O_TRUNC | O_CREAT,
tools/regression/priv/test_acct.c
12
int fh = open(tmp_file, O_CREAT | O_TRUNC | O_WRONLY, 0666);
usr.bin/cap_mkdb/cap_mkdb.c
111
if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR,
usr.bin/chkey/chkey.c
195
fd = open(ROOTKEY, O_WRONLY|O_TRUNC|O_CREAT, 0);
usr.bin/dsynth/build.c
2132
tmpfd = open(pkg.logfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
usr.bin/dsynth/build.c
3068
fd2 = open(tmp, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0644);
usr.bin/dsynth/mount.c
141
fd = open(goodbuf, O_RDWR|O_CREAT|O_TRUNC, 0644);
usr.bin/dsynth/subs.c
159
(void)dlogfd(i, O_RDWR|O_CREAT|O_TRUNC|O_APPEND);
usr.bin/gcore/gcore.c
165
fd = open(corefile, O_RDWR|O_CREAT|O_TRUNC, DEFFILEMODE);
usr.bin/gencat/gencat.c
186
if ((ofd = open(catfile, O_WRONLY | O_TRUNC | O_CREAT, 0666)) < 0)
usr.bin/mail/main.c
90
if ((i = open(Tflag, O_CREAT | O_TRUNC | O_WRONLY,
usr.bin/mail/quit.c
230
close(open(mbox, O_CREAT | O_TRUNC | O_WRONLY, 0600));
usr.bin/mail/v7.local.c
68
close(open(mailname, O_CREAT | O_TRUNC | O_WRONLY, 0600));
usr.bin/patch/util.c
170
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
usr.bin/sed/compile.c
288
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/compile.c
741
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/process.c
244
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC,
usr.bin/sed/process.c
482
O_WRONLY|O_APPEND|O_CREAT|O_TRUNC, DEFFILEMODE)) == -1)
usr.bin/tee/tee.c
89
flags = O_WRONLY|O_CREAT|O_TRUNC;
usr.bin/unzip/unzip.c
644
if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0)
usr.bin/xinstall/xinstall.c
991
return (open(path, O_CREAT | O_RDWR | O_TRUNC, S_IRUSR | S_IWUSR));
usr.sbin/boot0cfg/boot0cfg.c
154
write_mbr(fpath, O_CREAT | O_TRUNC, mbr, mbr_size);
usr.sbin/bthcid/parser.y
361
if ((f = open(tmp, O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0600)) < 0) {
usr.sbin/fwcontrol/fwdv.c
105
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
usr.sbin/installer/dfuibe_installer/fn_configure.c
421
fd = open("/tmp/t1", O_RDWR | O_CREAT | O_TRUNC,
usr.sbin/keyserv/keyserv.c
289
fd = open(ROOTKEY, O_WRONLY|O_TRUNC|O_CREAT, 0);
usr.sbin/lpr/common_source/ctlinfo.c
447
newfd = open(tfname2, O_WRONLY|O_CREAT|O_TRUNC, 0660);
usr.sbin/lpr/lpd/printjob.c
1274
errfd = open(tempstderr, O_WRONLY|O_TRUNC, 0664);
usr.sbin/lpr/lpd/printjob.c
794
n = open(tempstderr, O_WRONLY|O_TRUNC, 0664);
usr.sbin/makefs/ffs.c
521
oflags |= O_TRUNC;
usr.sbin/makefs/hammer2.c
2252
fd = open(out, O_WRONLY | O_CREAT | O_TRUNC, 0666);
usr.sbin/makefs/hammer2.c
884
oflags |= O_TRUNC;
usr.sbin/mpsutil/mps_flash.c
92
fd = open(firmware_file, O_CREAT | O_TRUNC | O_RDWR, 0644);
usr.sbin/ppp/ipcp.c
325
if ((fd = ID0open(_PATH_RESCONF, O_WRONLY|O_TRUNC, 0644)) != -1) {
usr.sbin/pw/edgroup.c
76
if ((outfd = open(grouptmp, O_RDWR | O_CREAT | O_TRUNC, 0644)) != -1) {
usr.sbin/pw/fileupd.c
92
outfd = open(file, O_RDWR | O_CREAT | O_TRUNC, fmode);
usr.sbin/pw/pw_conf.c
383
if ((fd = open(file, O_CREAT | O_RDWR | O_TRUNC | O_EXLOCK, 0644)) != -1) {
usr.sbin/sa/pdb.c
162
saved_pacct_db = dbopen(_PATH_SAVACCT, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/sa/usrdb.c
181
saved_usracct_db = dbopen(_PATH_USRACCT, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/tzsetup/tzsetup.c
1027
O_WRONLY | O_CREAT | O_TRUNC,
usr.sbin/usbdump/usbdump.c
748
p->wfd = open(w_arg, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR);
usr.sbin/usbdump/usbdump.c
871
p->bfd = open(b_arg, O_CREAT | O_TRUNC |
usr.sbin/vnconfig/vnconfig.c
376
fd = open(file, O_RDWR|O_CREAT|O_TRUNC, 0600);
usr.sbin/ypbind/ypbind.c
904
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
906
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1)
usr.sbin/ypbind/ypbind.c
910
if ((fd = open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
912
if ((fd = open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1)