Symbol: O_WRONLY
bin/cat/cat.c
319
case O_WRONLY:
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
1119
if ((fd2 = hc_open(&DstHost, path, O_WRONLY|O_CREAT|O_EXCL, 0600)) < 0) {
bin/cpdup/cpdup.c
1128
fd2 = hc_open(&DstHost, path, O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0600);
bin/cpdup/hcproto.c
684
if ((flags & (O_WRONLY | O_RDWR)) == 0 && hc->version >= 4) {
bin/cpdup/hcproto.c
762
if (flags & (O_WRONLY | O_RDWR | O_CREAT | O_TRUNC)) {
bin/dd/dd.c
165
out.fd = open(out.name, O_WRONLY | OFLAGS, DEFFILEMODE);
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/rm/rm.c
451
if ((fd = open(file, O_WRONLY, 0)) == -1)
bin/sh/redir.c
202
if ((f = open(fname, O_WRONLY|O_CREAT|O_EXCL, 0666)) < 0)
bin/sh/redir.c
205
if ((f = open(fname, O_WRONLY, 0666)) < 0)
bin/sh/redir.c
220
if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
bin/sh/redir.c
225
if ((f = open(fname, O_WRONLY|O_CREAT|O_APPEND, 0666)) < 0)
crypto/openssh/authfile.c
502
if ((fd = open(path, O_WRONLY|O_CREAT|O_TRUNC, 0644)) == -1)
crypto/openssh/log.c
319
if ((fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0600)) == -1) {
crypto/openssh/loginrec.c
1098
if ((fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) < 0) {
crypto/openssh/loginrec.c
1270
if ((fd = open(WTMPX_FILE, O_WRONLY|O_APPEND, 0)) < 0) {
crypto/openssh/loginrec.c
1676
if ((fd = open(_PATH_BTMP, O_WRONLY | O_APPEND)) < 0) {
crypto/openssh/scp.c
1877
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
265
flags = O_WRONLY;
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)
crypto/openssh/sshkey-xmss.c
618
if ((fd = open(nstatefile, O_CREAT|O_WRONLY|O_EXCL, 0600)) == -1) {
crypto/openssh/sshpty.c
141
fd = open(_PATH_TTY, O_WRONLY);
games/hunt/huntd/driver.c
1095
if ((tty = open(_PATH_TTY, O_WRONLY)) >= 0) {
games/larn/bill.c
124
if ((fd = open(fname, O_WRONLY | O_TRUNC | O_CREAT, 0660)) == -1)
games/morse/morse.c
407
spkr = open(snddev, O_WRONLY, 0);
games/morse/morse.c
422
if ((line = open(device, O_WRONLY | O_NONBLOCK)) == -1) {
lib/libc/db/btree/bt_open.c
193
case O_WRONLY:
lib/libc/db/hash/hash.c
103
if ((flags & O_ACCMODE) == O_WRONLY) {
lib/libc/db/test/dbtest.c
104
O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
lib/libc/gen/creat.c
43
return(_open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
lib/libc/gen/posixshm.c
53
if ((flags & O_ACCMODE) == O_WRONLY) {
lib/libc/gen/syslog.c
297
(fd = _open(_PATH_CONSOLE, O_WRONLY|O_NONBLOCK|O_CLOEXEC, 0)) >= 0) {
lib/libc/gen/utmpx.c
382
fd = _open(file, O_WRONLY|O_APPEND|O_SHLOCK|O_CLOEXEC);
lib/libc/gen/utmpx.c
385
if ((fd = _open(file, O_CREAT|O_WRONLY|O_EXLOCK|O_CLOEXEC, 0644)) == -1)
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
70
m = O_WRONLY;
lib/libc/stdio/flags.c
78
m = O_WRONLY;
lib/libfetch/ftp.c
1144
oflag = O_WRONLY;
lib/libfetch/ftp.c
505
if (io->cconn == NULL || io->dconn == NULL || io->dir == O_WRONLY) {
lib/libnvmm/libnvmm.c
186
nvmm_fd = open("/dev/nvmm", O_WRONLY | O_CLOEXEC);
lib/libssh/openbsd-compat/bsd-misc.c
133
int ret, oflags = O_WRONLY;
lib/libssh/openbsd-compat/bsd-misc.c
170
int ret, oflags = O_WRONLY;
lib/libssh/openbsd-compat/bsd-misc.c
201
int ret, oflags = O_WRONLY;
lib/libssh/openbsd-compat/bsd-misc.c
228
fd = open(path, O_WRONLY);
lib/libtcplay/io.c
195
if ((fd = open(dev, O_WRONLY)) < 0) {
lib/libtcplay/io.c
337
if ((fd = open(dev, O_WRONLY)) < 0) {
lib/libtcplay/io.c
368
if ((fd = open(file, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) < 0) {
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/atrun/atrun.c
249
O_WRONLY | O_CREAT | O_EXCL, S_IWUSR | S_IRUSR)) < 0)
libexec/dma/local.c
153
mbox = open_locked(fn, O_WRONLY|O_APPEND);
libexec/dma/spool.c
436
fd = open(flushfn, O_CREAT|O_WRONLY|O_TRUNC, 0660);
libexec/ftpd/ftpd.c
1446
statfd = open(thishost->statfile, O_WRONLY|O_APPEND);
libexec/ftpd/ftpd.c
1448
statfd = open(_PATH_FTPDSTATFILE, O_WRONLY|O_APPEND);
libexec/tftpd/tftpd.c
554
fd = open(filename, mode == RRQ ? O_RDONLY : O_WRONLY|O_TRUNC);
sbin/dump/tape.c
590
pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
sbin/dump/tape.c
593
open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
sbin/fsck/setup.c
106
if (nflag || (fswritefd = open(dev, O_WRONLY)) < 0) {
sbin/growfs/growfs.c
1999
fso = open(device, O_WRONLY);
sbin/newfs/newfs.c
450
fso = open(special, O_WRONLY);
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/route/route.c
180
s = open(_PATH_DEVNULL, O_WRONLY, 0);
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,
sbin/svc/execute.c
192
cmd->logfd = open(cmd->logfile, O_WRONLY|O_CREAT|O_APPEND, 0640);
sbin/svc/execute.c
731
fd = open(logfile, O_WRONLY|O_CREAT|O_APPEND, 0640);
stand/boot/pc32/btxld/btxld.c
246
if ((fdo = open(name, O_CREAT | O_TRUNC | O_WRONLY, 0666)) == -1)
sys/dev/sound/midi/sequencer.c
1232
if (mode == O_WRONLY)
sys/dev/virtual/nvmm/nvmm_dragonfly.c
307
if (OFLAGS(flags) & O_WRONLY) {
sys/dev/virtual/nvmm/nvmm_netbsd.c
292
if (OFLAGS(flags) & O_WRONLY) {
sys/kern/imgact_elf.c
973
fp->f_flag = O_CREAT|O_WRONLY|O_NOFOLLOW;
sys/kern/kern_checkpoint.c
818
error = fp_open(buf, O_WRONLY|O_CREAT|O_TRUNC|O_NOFOLLOW, 0600, &fp);
sys/kern/sys_mqueue.c
433
if ((oflag & O_ACCMODE) == (O_WRONLY | O_RDWR)) {
test/illumos/oclo/oclo_errors.c
145
if (!oclo_dup3("dup3(): O_CLOFORK|O_WRONLY", O_CLOFORK | O_WRONLY)) {
test/illumos/oclo/oclo_errors.c
171
if (!oclo_pipe2("pipe2(): O_CLOFORK|O_WRONLY", O_CLOFORK | O_WRONLY)) {
test/stress/fsstress/fsstress.c
1834
fd = open_path(&f, O_WRONLY);
test/stress/fsstress/fsstress.c
1911
fd = open_path(&f, O_WRONLY);
test/stress/fsstress/fsstress.c
1997
fd = open_path(&f, O_WRONLY);
test/stress/fsstress/fsstress.c
2593
fd = open_path(&f, O_WRONLY);
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) {
tools/regression/priv/test_acct.c
12
int fh = open(tmp_file, O_CREAT | O_TRUNC | O_WRONLY, 0666);
tools/tools/net80211/w00t/prga/prga.c
126
fd = open(p->fname, O_WRONLY | O_CREAT, 0644);
tools/tools/net80211/wesside/wesside/wesside.c
2102
fd = open(KEY_FILE, O_WRONLY | O_CREAT | 0644);
tools/tools/net80211/wesside/wesside/wesside.c
2406
weplog.fd = open(WEP_FILE, O_WRONLY | O_APPEND);
tools/tools/net80211/wesside/wesside/wesside.c
2419
weplog.fd = open(WEP_FILE, O_WRONLY | O_CREAT,
tools/tools/net80211/wesside/wesside/wesside.c
864
fd = open(PRGA_FILE, O_WRONLY | O_CREAT,
tools/tools/net80211/wesside/wesside/wesside.c
978
fd = open(path, O_WRONLY | O_CREAT, 0644);
usr.bin/at/at.c
243
if ((lockdes = open(LFILE, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR)) < 0)
usr.bin/at/at.c
282
if ((fdes = creat(atfile, O_WRONLY)) == -1)
usr.bin/chkey/chkey.c
195
fd = open(ROOTKEY, O_WRONLY|O_TRUNC|O_CREAT, 0);
usr.bin/gencat/gencat.c
186
if ((ofd = open(catfile, O_WRONLY | O_TRUNC | O_CREAT, 0666)) < 0)
usr.bin/gzip/gzip.c
1224
out = open(outfile, O_WRONLY | O_CREAT | O_EXCL, 0600);
usr.bin/gzip/gzip.c
1388
zfd = open(outfile, O_WRONLY|O_CREAT|O_EXCL, 0600);
usr.bin/ktrace/ktrace.c
129
if ((fd = open(tracefile, O_CREAT | O_WRONLY, DEFFILEMODE)) < 0)
usr.bin/ktrace/ktrace.c
137
if ((fd = open(tracefile, O_CREAT | O_EXCL | O_WRONLY,
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/inp.c
295
if ((tifd = open(TMPINNAME, O_EXCL | O_CREAT | O_WRONLY, 0666)) < 0)
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/tcopy/tcopy.c
117
op == COPY ? O_WRONLY : O_RDWR, DEFFILEMODE)) < 0)
usr.bin/tee/tee.c
87
flags = O_WRONLY|O_CREAT|O_APPEND;
usr.bin/tee/tee.c
89
flags = O_WRONLY|O_CREAT|O_TRUNC;
usr.bin/touch/touch.c
165
O_WRONLY | O_CREAT, DEFFILEMODE);
usr.bin/truncate/truncate.c
101
oflags = O_WRONLY;
usr.bin/truncate/truncate.c
103
oflags = O_WRONLY | O_CREAT;
usr.bin/truss/setup.c
81
fd = open(buf, O_WRONLY);
usr.bin/usbhidaction/usbhidaction.c
168
fp = open(pidfile, O_WRONLY|O_CREAT, S_IRUSR|S_IRGRP|S_IROTH);
usr.bin/uudecode/uudecode.c
254
flags = O_WRONLY | O_CREAT | O_EXCL;
usr.bin/wall/ttymsg.c
85
if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) {
usr.sbin/boot0cfg/boot0cfg.c
263
fd = open(fname, O_WRONLY | flags, 0666);
usr.sbin/cpucontrol/cpucontrol.c
318
fd = open(dev, op == OP_READ ? O_RDONLY : O_WRONLY);
usr.sbin/cron/lib/misc.c
449
LogFD = open(LOG_FILE, O_WRONLY|O_APPEND|O_CREAT, 0600);
usr.sbin/daemon/daemon.c
172
outfd = open(outfn, O_CREAT | O_WRONLY | O_APPEND | O_CLOEXEC, 0600);
usr.sbin/daemon/daemon.c
375
O_WRONLY |
usr.sbin/edquota/edquota.c
409
if ((fd = open(qup->qfname, O_WRONLY)) < 0) {
usr.sbin/fwcontrol/fwdv.c
105
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
usr.sbin/keyserv/keyserv.c
289
fd = open(ROOTKEY, O_WRONLY|O_TRUNC|O_CREAT, 0);
usr.sbin/lpr/common_source/common.c
364
fd = open(lfname, O_WRONLY|O_CREAT, newbits);
usr.sbin/lpr/common_source/common.c
663
statfile = open(statfname, O_WRONLY|O_APPEND, 0664);
usr.sbin/lpr/common_source/ctlinfo.c
447
newfd = open(tfname2, O_WRONLY|O_CREAT|O_TRUNC, 0660);
usr.sbin/lpr/lpc/cmds.c
361
fd = open(statfile, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE);
usr.sbin/lpr/lpd/lpd.c
271
lfd = open(_PATH_MASTERLOCK, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK,
usr.sbin/lpr/lpd/printjob.c
1274
errfd = open(tempstderr, O_WRONLY|O_TRUNC, 0664);
usr.sbin/lpr/lpd/printjob.c
153
if (open(pp->log_file, O_WRONLY|O_APPEND, LOG_FILE_MODE) < 0) {
usr.sbin/lpr/lpd/printjob.c
156
open(_PATH_DEVNULL, O_WRONLY);
usr.sbin/lpr/lpd/printjob.c
1753
pfd = open(pp->lp, pp->rw ? O_RDWR : O_WRONLY);
usr.sbin/lpr/lpd/printjob.c
184
lfd = open(pp->lock_file, O_WRONLY|O_CREAT|O_EXLOCK|O_NONBLOCK,
usr.sbin/lpr/lpd/printjob.c
1856
fd = open(pp->status_file, O_WRONLY|O_CREAT|O_EXLOCK, STAT_FILE_MODE);
usr.sbin/lpr/lpd/printjob.c
794
n = open(tempstderr, O_WRONLY|O_TRUNC, 0664);
usr.sbin/lpr/lpd/recvjob.c
101
if (open(pp->log_file, O_WRONLY|O_APPEND, 0664) < 0) {
usr.sbin/lpr/lpd/recvjob.c
103
open(_PATH_DEVNULL, O_WRONLY);
usr.sbin/lpr/lpd/recvjob.c
248
fd = open(file, O_CREAT|O_EXCL|O_WRONLY, FILMOD);
usr.sbin/lpr/lpr/lpr.c
634
f = open(n, O_WRONLY | O_EXCL | O_CREAT, FILMOD);
usr.sbin/lptcontrol/lptcontrol.c
92
if ((fd = open(device, O_WRONLY)) < 0)
usr.sbin/makefs/hammer2.c
2252
fd = open(out, O_WRONLY | O_CREAT | O_TRUNC, 0666);
usr.sbin/powerd/powerd.c
755
fd = open("/dev/dsp", O_WRONLY);
usr.sbin/ppp/ipcp.c
325
if ((fd = ID0open(_PATH_RESCONF, O_WRONLY|O_TRUNC, 0644)) != -1) {
usr.sbin/pw/pw_log.c
40
int fd = open(cnf->logfile, O_WRONLY | O_CREAT | O_APPEND, 0600);
usr.sbin/pwd_mkdb/pwd_mkdb.c
301
O_WRONLY|O_CREAT|O_EXCL, PERM_INSECURE)) < 0)
usr.sbin/pwd_mkdb/pwd_mkdb.c
676
if ((to_fd = open(to, O_WRONLY|O_CREAT|O_EXCL, mode)) < 0)
usr.sbin/rwhod/rwhod.c
355
whod = open(path, O_WRONLY | O_CREAT, 0644);
usr.sbin/sliplogin/sliplogin.c
493
if ((fd = open(_PATH_DEVNULL, O_WRONLY)) != 1) {
usr.sbin/syslogd/syslogd.c
281
static int logflags = O_WRONLY|O_APPEND; /* flags used to open log files */
usr.sbin/syslogd/syslogd.c
969
f->f_file = open(ctty, O_WRONLY | O_NONBLOCK, 0);
usr.sbin/tzsetup/tzsetup.c
1027
O_WRONLY | O_CREAT | O_TRUNC,
usr.sbin/tzsetup/tzsetup.c
760
fd2 = open(path_localtime, O_CREAT | O_EXCL | O_WRONLY,
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
872
O_WRONLY, S_IRUSR | S_IWUSR);