bin/cat/cat.c
137
fd = open(path, O_RDONLY);
bin/cat/cat.c
140
fd = udom_open(path, O_RDONLY);
bin/cat/cat.c
315
case O_RDONLY:
bin/cp/utils.c
66
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
bin/cpdup/cpdup.c
1118
if ((fd1 = hc_open(&SrcHost, spath, O_RDONLY, 0)) >= 0) {
bin/cpdup/cpdup.c
1404
fd = hc_open(cphost, fpath, O_RDONLY, 0);
bin/cpdup/cpdup.c
649
fd1 = hc_open(&SrcHost, spath, O_RDONLY, 0);
bin/cpdup/cpdup.c
650
fd2 = hc_open(&DstHost, dpath, O_RDONLY, 0);
bin/cpdup/hcproto.c
766
flags |= O_RDONLY;
bin/cpdup/hcproto.c
979
if ((fd = open(path, O_RDONLY)) < 0)
bin/cpdup/md5.c
268
fd = open(filename, O_RDONLY);
bin/dd/dd.c
141
in.fd = open(in.name, O_RDONLY, 0);
bin/mv/mv.c
288
if ((from_fd = open(from, O_RDONLY, 0)) < 0) {
bin/pax/ar_io.c
60
#define EXT_MODE O_RDONLY /* open mode for list/extract */
bin/pax/ar_subs.c
425
if ((fd = open(arcn->org_name, O_RDONLY, 0)) < 0) {
bin/pax/ar_subs.c
906
if ((fdsrc = open(arcn->org_name, O_RDONLY, 0)) < 0) {
bin/pax/pax.c
228
cwdfd = open(".", O_RDONLY | O_CLOEXEC);
bin/ps/ps.c
340
kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
bin/sh/exec.c
186
in = open(cmd, O_RDONLY | O_NONBLOCK);
bin/sh/input.c
367
if ((fd = open(fname, O_RDONLY | O_CLOEXEC_MAYBE)) < 0) {
bin/sh/jobs.c
953
if (open(_PATH_DEVNULL, O_RDONLY) != 0)
bin/sh/jobs.c
965
if (open(_PATH_DEVNULL, O_RDONLY) != 0)
bin/sh/main.c
248
if ((fd = open(expandedname, O_RDONLY | O_CLOEXEC_MAYBE)) >= 0)
bin/sh/redir.c
190
if ((f = open(fname, O_RDONLY)) < 0)
bin/stty/stty.c
70
if ((i.fd = open(optarg, O_RDONLY | O_NONBLOCK)) < 0)
crypto/libressl/apps/openssl/certhash.c
670
if ((cwdfd = open(".", O_RDONLY)) == -1) {
crypto/libressl/tls/tls_config.c
51
if ((fd = open(filename, O_RDONLY)) == -1) {
crypto/libressl/tls/tls_util.c
164
if ((fd = open(name, O_RDONLY)) == -1)
crypto/openssh/auth-rhosts.c
68
if ((fd = open(filename, O_RDONLY|O_NONBLOCK)) == -1)
crypto/openssh/auth2-pubkeyfile.c
450
if ((fd = open(file, O_RDONLY|O_NONBLOCK)) == -1) {
crypto/openssh/auth2.c
113
if ((fd = open(options.banner, O_RDONLY)) == -1)
crypto/openssh/authfile.c
128
if ((fd = open(filename, O_RDONLY)) == -1)
crypto/openssh/authfile.c
183
if ((fd = open(filename, O_RDONLY)) == -1)
crypto/openssh/loginrec.c
1192
if ((fd = open(WTMP_FILE, O_RDONLY)) < 0) {
crypto/openssh/loginrec.c
1357
if ((fd = open(WTMPX_FILE, O_RDONLY)) < 0) {
crypto/openssh/loginrec.c
1595
if (!lastlog_openseek(li, &fd, O_RDONLY))
crypto/openssh/misc.c
2026
if ((fd = open(_PATH_TTY, O_RDONLY | O_NOCTTY)) >= 0) {
crypto/openssh/misc.c
3066
if ((fd = open(path, O_RDONLY)) < 0) {
crypto/openssh/monitor.c
1607
if ((fd0 = open(_PATH_DEVNULL, O_RDONLY)) == -1)
crypto/openssh/sandbox-systrace.c
150
if ((dev_systrace = open("/dev/systrace", O_RDONLY)) == -1)
crypto/openssh/scp.c
1408
if ((fd = open(name, O_RDONLY|O_NONBLOCK)) == -1)
crypto/openssh/sftp-client.c
2054
if ((local_fd = open(local_path, O_RDONLY)) == -1) {
crypto/openssh/sftp-server.c
263
flags = O_RDONLY;
crypto/openssh/sftp-server.c
760
((flags & O_ACCMODE) != O_RDONLY ||
crypto/openssh/ssh-add.c
263
} else if ((fd = open(filename, O_RDONLY)) == -1) {
crypto/openssh/ssh-keygen.c
2775
else if ((fd = open(argv[i], O_RDONLY)) == -1) {
crypto/openssh/ssh-keysign.c
204
key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
crypto/openssh/ssh-keysign.c
206
key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
crypto/openssh/ssh-keysign.c
207
key_fd[i++] = open(_PATH_HOST_ED25519_KEY_FILE, O_RDONLY);
crypto/openssh/ssh-keysign.c
208
key_fd[i++] = open(_PATH_HOST_XMSS_KEY_FILE, O_RDONLY);
crypto/openssh/ssh-keysign.c
209
key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
crypto/openssh/ssh.c
2170
in = open(_PATH_DEVNULL, O_RDONLY);
crypto/openssh/sshbuf-io.c
86
if ((fd = open(path, O_RDONLY)) == -1)
crypto/openssh/sshkey-xmss.c
405
if ((fd = open(filename, O_RDONLY)) >= 0) {
crypto/openssh/sshkey-xmss.c
478
if ((lockfd = open(lockfile, O_CREAT|O_RDONLY, 0600)) == -1) {
games/backgammon/common_source/save.c
144
if ((fdesc = open(s, O_RDONLY)) == -1)
games/canfield/cfscores/cfscores.c
68
dbfd = open(_PATH_SCORE, O_RDONLY);
games/fortune/fortune/fortune.c
1083
if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, O_RDONLY)) < 0) {
games/fortune/fortune/fortune.c
1102
if ((fd = open(fp->posfile, O_RDONLY)) < 0 ||
games/fortune/fortune/fortune.c
1131
if ((fd = open(fp->datfile, O_RDONLY)) < 0) {
games/fortune/fortune/fortune.c
490
if ((fd = open(path, O_RDONLY)) < 0) {
games/fortune/fortune/fortune.c
654
if ((fd = open(offensive, O_RDONLY)) < 0)
games/hack/hack.bones.c
153
if ((fd = open(bones, O_RDONLY)) < 0)
games/hack/hack.bones.c
86
if ((fd = open(bones, O_RDONLY)) >= 0) {
games/hack/hack.do.c
236
if ((fd = open(lock, O_RDONLY)) < 0) {
games/hack/hack.main.c
103
fd = open("/dev/null", O_RDONLY);
games/hack/hack.main.c
308
if ((fd = open(SAVEF, O_RDONLY)) >= 0 &&
games/hack/hack.pager.c
371
int fd = open(fnam, O_RDONLY);
games/hack/hack.save.c
131
if ((ofd = open(lock, O_RDONLY)) < 0) {
games/hack/hack.unix.c
303
if ((fd = open(lock, O_RDONLY)) == -1) {
games/hack/makedefs.c
95
if ((fd = open(argv[1], O_RDONLY)) < 0) {
games/hangman/getsym.c
99
if ((symfd = open(Dict_name, O_RDONLY)) < 0)
games/larn/io.c
529
if ((io_infd = open(str, O_RDONLY)) < 0) {
games/mille/save.c
149
if ((inf = open(file, O_RDONLY)) < 0) {
games/random/random.c
138
if ((fd = open(filename, O_RDONLY, 0)) < 0)
games/robots/score.c
170
if ((inf = open(Scorefile, O_RDONLY)) < 0) {
games/rogue/machdep.c
481
if ((fd = open(_PATH_SCOREFILE, O_RDONLY)) < 1) {
games/sail/main.c
72
fd = open("/dev/null", O_RDONLY);
games/tetris/scores.c
106
mint = O_RDONLY;
games/trek/dumpgame.c
117
if ((fd = open("trek.dump", O_RDONLY)) < 0 ||
games/wump/wump.c
741
if ((fd = open(_PATH_WUMPINFO, O_RDONLY)) == -1)
include/ndbm.h
42
#define DBM_RDONLY O_RDONLY
lib/libc/citrus/citrus_mmap.c
62
if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1)
lib/libc/db/btree/bt_open.c
188
case O_RDONLY:
lib/libc/db/db/db.c
57
O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
lib/libc/db/hash/hash.c
125
statbuf.st_size == 0 && (flags & O_ACCMODE) != O_RDONLY;
lib/libc/db/hash/hash.c
537
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
lib/libc/db/hash/hash.c
556
if ((hashp->flags & O_ACCMODE) == O_RDONLY) {
lib/libc/db/recno/rec_open.c
120
case O_RDONLY:
lib/libc/db/recno/rec_open.c
133
case O_RDONLY:
lib/libc/db/test/dbtest.c
656
if ((fd = open(name, O_RDONLY, 0)) < 0 ||
lib/libc/db/test/hash.tests/tread2.c
67
if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) {
lib/libc/db/test/hash.tests/tseq.c
56
if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, NULL))) {
lib/libc/db/test/hash.tests/tverify.c
68
if (!(dbp = dbopen( "hashtest", O_RDONLY, 0400, DB_HASH, &ctl))) {
lib/libc/gen/fts.c
1103
if (fd < 0 && (newfd = _open(path, O_RDONLY | O_CLOEXEC, 0)) < 0)
lib/libc/gen/fts.c
200
(sp->fts_rfd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
lib/libc/gen/fts.c
325
if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
lib/libc/gen/fts.c
416
if ((p->fts_symfd = _open(".", O_RDONLY | O_CLOEXEC,
lib/libc/gen/fts.c
553
if ((fd = _open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
lib/libc/gen/getcap.c
245
if ((capdbp = dbopen(pbuf, O_RDONLY, 0, DB_HASH, 0))
lib/libc/gen/getcap.c
266
fd = _open(*db_p, O_RDONLY | O_CLOEXEC, 0);
lib/libc/gen/getpwent.c
737
(res = dbopen(_PATH_SMP_DB, O_RDONLY, 0, DB_HASH, NULL)) == NULL)
lib/libc/gen/getpwent.c
738
res = dbopen(_PATH_MP_DB, O_RDONLY, 0, DB_HASH, NULL);
lib/libc/gen/nlist.c
64
fd = _open(name, O_RDONLY | O_CLOEXEC, 0);
lib/libc/gen/opendir.c
83
fd = _open(name, O_RDONLY | O_NONBLOCK | O_DIRECTORY | O_CLOEXEC);
lib/libc/gen/posixshm.c
110
dfd = _open("/var/run/shm", O_RDONLY|O_DIRECTORY);
lib/libc/gen/posixshm.c
112
dfd = _open("/tmp", O_RDONLY|O_DIRECTORY);
lib/libc/gen/posixshm.c
65
dfd = _open("/var/run/shm", O_RDONLY|O_DIRECTORY);
lib/libc/gen/posixshm.c
67
dfd = _open("/tmp", O_RDONLY|O_DIRECTORY);
lib/libc/gen/utmpx.c
455
db = dbopen(fname, O_RDONLY|O_SHLOCK|O_CLOEXEC, 0, DB_HASH, NULL);
lib/libc/locale/collate.c
125
if ((fd = _open(buf, O_RDONLY)) < 0)
lib/libc/locale/ldpart.c
90
if ((fd = _open(filename, O_RDONLY | O_CLOEXEC)) < 0)
lib/libc/locale/rune.c
73
if ((fd = _open(fname, O_RDONLY)) < 0) {
lib/libc/nls/msgcat.c
402
if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) {
lib/libc/stdio/flags.c
62
m = O_RDONLY;
lib/libc/stdlib/rand.c
112
fd = _open("/dev/random", O_RDONLY, 0);
lib/libc/stdlib/random.c
285
fd = _open("/dev/random", O_RDONLY|O_CLOEXEC, 0);
lib/libc/stdtime/localtime.c
387
if ((fid = _open(name, O_RDONLY)) == -1) {
lib/libc/upmap/upmap.c
89
fd = _open("/dev/kpmap", O_RDONLY);
lib/libc/yp/yplib.c
385
if ((fd = _open(path, O_RDONLY | O_CLOEXEC)) == -1) {
lib/libdmsg/crypto.c
479
fd = open("/dev/urandom", O_RDONLY);
lib/libexecinfo/backtrace.c
184
if ((fd = open_self(O_RDONLY)) != -1)
lib/libfetch/common.c
1680
if ((fd = open(fn, O_RDONLY)) < 0) {
lib/libfetch/ftp.c
1146
oflag = O_RDONLY;
lib/libfetch/ftp.c
538
if (io->cconn == NULL || io->dconn == NULL || io->dir == O_RDONLY) {
lib/libfsid/libfsid.c
136
if ((fd = open(dev, O_RDONLY)) < 0)
lib/libhammer/info.c
59
if ((fd = open(path, O_RDONLY)) < 0)
lib/libhammer/misc.c
98
fd = open(mnt->f_mntonname, O_RDONLY);
lib/libhammer/snapshot.c
81
if (path == NULL || (fd = open(path, O_RDONLY)) < 0) {
lib/libkcore/kcore.c
55
kc->kd = kvm_openfiles(execfile, corefile, NULL, O_RDONLY, errbuf);
lib/libkvm/kvm.c
199
kd->vmfd = open(_PATH_DEVNULL, O_RDONLY);
lib/libkvm/kvm.c
216
if ((kd->nlfd = open(uf, O_RDONLY, 0)) < 0) {
lib/libkvm/kvm_proc.c
927
fd = open(procfile, O_RDONLY, 0);
lib/libnvmm/libnvmm.c
163
nvmm_fd = open("/dev/nvmm", O_RDONLY | O_CLOEXEC);
lib/libpam/modules/pam_nologin/pam_nologin.c
100
fd = open(nologin, O_RDONLY, 0);
lib/libtcplay/io.c
121
if ((fd = open((weak) ? "/dev/urandom" : "/dev/random", O_RDONLY)) < 0) {
lib/libtcplay/io.c
190
if ((fd_rand = open("/dev/urandom", O_RDONLY)) < 0) {
lib/libtcplay/io.c
253
if ((fd = open(dev, O_RDONLY)) < 0) {
lib/libtcplay/io.c
279
if ((fd = open(dev, O_RDONLY)) < 0) {
lib/libtcplay/io.c
58
if ((fd = open(file, O_RDONLY)) < 0) {
lib/libusb/libusb20_ugen20.c
282
state.f = open("/dev/" USB_DEVICE_NAME, O_RDONLY);
lib/libusb/libusb20_ugen20.c
919
f = open("/dev/" USB_DEVICE_NAME, O_RDONLY);
lib/libutil/auth.c
51
if ((fd = open(path, O_RDONLY)) < 0) {
lib/libutil/gr_util.c
103
lockfd = flopen(group_file, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
lib/libutil/login_auth.c
86
if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0)
lib/libutil/login_cap.c
241
else if ((r = open(login_dbarray[0], O_RDONLY | O_CLOEXEC)) >= 0)
lib/libutil/pidfile.c
74
fd = open(path, O_RDONLY | O_CLOEXEC);
lib/libutil/pw_util.c
176
lockfd = flopen(masterpasswd, O_RDONLY|O_NONBLOCK|O_CLOEXEC, 0);
lib/libutil/uucplock.c
90
if ((fd = open(lckname, O_RDONLY | O_CLOEXEC)) < 0)
libexec/atrun/atrun.c
342
if (open(filename, O_RDONLY) != STDIN_FILENO)
libexec/dma/dma-mbox-create.c
133
maildirfd = open(_PATH_MAILDIR, O_RDONLY);
libexec/dma/dma-mbox-create.c
139
f = openat(maildirfd, user, O_RDONLY|O_CREAT|O_NOFOLLOW, 0600);
libexec/dma/util.c
356
rf = open("/dev/urandom", O_RDONLY);
libexec/dma/util.c
358
rf = open("/dev/random", O_RDONLY);
libexec/ftpd/site_md5.c
52
fd = open(filename, O_RDONLY);
libexec/getty/main.c
307
if ((fd = open(IF, O_RDONLY)) != -1) {
libexec/rbootd/rmpproto.c
356
if ((rconn->bootfd = open(filename, O_RDONLY, 0600)) < 0) {
libexec/rpc.rquotad/rquotad.c
243
if ((fd = open(fs->qfpathname, O_RDONLY)) < 0) {
libexec/rtld-elf/libmap.c
119
fd = open(rpath, O_RDONLY | O_CLOEXEC);
libexec/rtld-elf/rtld.c
1711
if ((fd = open(ld_elf_hints_path, O_RDONLY | O_CLOEXEC)) == -1)
libexec/rtld-elf/rtld.c
2180
if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) {
libexec/rtld-elf/rtld.c
2928
fd = openat(dirfd, name, O_RDONLY | O_CLOEXEC);
libexec/tftpd/tftpd.c
554
fd = open(filename, mode == RRQ ? O_RDONLY : O_WRONLY|O_TRUNC);
libexec/utmp_update/utmp_update.c
127
fd = open(tty, O_RDONLY|O_NONBLOCK, 0);
sbin/badsect/badsect.c
119
if ((fsi = open(name, O_RDONLY)) < 0)
sbin/ccdconfig/ccdconfig.c
481
if ((kd = kvm_openfiles(kernel, core, NULL, O_RDONLY,
sbin/comcontrol/comcontrol.c
66
fd = open(argv[1], O_RDONLY | O_NONBLOCK, 0);
sbin/devd/devd.cc
954
fd = open(PATH_DEVCTL, O_RDONLY | O_CLOEXEC);
sbin/dhclient/dhclient.c
460
if ((fd = open(path_dhclient_db, O_RDONLY|O_EXLOCK|O_CREAT, 0)) == -1)
sbin/diskinfo/diskinfo.c
74
if ((fd = open(av[i], O_RDONLY)) < 0) {
sbin/disklabel32/disklabel.c
1501
if ((f = open(dkname, O_RDONLY)) == -1) {
sbin/disklabel32/disklabel.c
243
f = open(specname, op == READ ? O_RDONLY : O_RDWR);
sbin/disklabel32/disklabel.c
588
b = open(xxboot, O_RDONLY);
sbin/disklabel32/disklabel.c
595
b = open(bootxx, O_RDONLY);
sbin/disklabel64/disklabel64.c
1576
if ((f = open(dkname, O_RDONLY)) == -1) {
sbin/disklabel64/disklabel64.c
247
f = open(specname, op == READ ? O_RDONLY : O_RDWR);
sbin/disklabel64/disklabel64.c
613
if ((fd = open(boot1path, O_RDONLY)) < 0)
sbin/disklabel64/disklabel64.c
623
if ((fd = open(boot2path, O_RDONLY)) < 0)
sbin/dmesg/dmesg.c
146
kd = kvm_open(nlistf, memf, NULL, O_RDONLY, "dmesg");
sbin/dump/main.c
337
if ((diskfd = open(disk, O_RDONLY)) < 0)
sbin/dump/tape.c
744
if ((diskfd = open(disk, O_RDONLY)) < 0)
sbin/dumpfs/dumpfs.c
112
if ((fd = open(name, O_RDONLY, 0)) < 0)
sbin/dumpfs/dumpfs.c
319
if ((fd = open(name, O_RDONLY, 0)) < 0)
sbin/fdisk/fdisk.c
505
if ((boot_fd = open(fname, O_RDONLY)) == -1 ||
sbin/fdisk/fdisk.c
791
O_RDWR : O_RDONLY);
sbin/ffsinfo/ffsinfo.c
235
fsi = open(device, O_RDONLY);
sbin/fsck/setup.c
100
if ((fsreadfd = open(dev, O_RDONLY)) < 0) {
sbin/fsck_msdosfs/check.c
54
dosfs = open(fname, rdonly ? O_RDONLY : O_RDWR, 0);
sbin/fsck_msdosfs/check.c
56
dosfs = open(fname, O_RDONLY, 0);
sbin/fsirand/fsirand.c
114
if ((devfd = open(device, printonly ? O_RDONLY : O_RDWR)) < 0) {
sbin/gpt/boot.c
146
bfd = open("/boot/boot0", O_RDONLY);
sbin/gpt/gpt.c
595
mode = readonly ? O_RDONLY : O_RDWR|O_EXCL;
sbin/growfs/growfs.c
2008
fsi = open(device, O_RDONLY);
sbin/hammer/cmd_abort.c
74
pf_fd = open(pidfile, O_RDONLY | O_CLOEXEC);
sbin/hammer/cmd_cleanup.c
178
fd = open(path, O_RDONLY);
sbin/hammer/cmd_config.c
187
fd = open(path, O_RDONLY);
sbin/hammer/cmd_config.c
217
if ((fd = open(dirpath, O_RDONLY)) < 0) {
sbin/hammer/cmd_config.c
241
if ((fd = open(dirpath, O_RDONLY)) < 0) {
sbin/hammer/cmd_config.c
82
fd = open(av[1], O_RDONLY);
sbin/hammer/cmd_history.c
219
fd = open(path, O_RDONLY);
sbin/hammer/cmd_history.c
88
fd = open(path, O_RDONLY);
sbin/hammer/cmd_info.c
94
fd = open(path, O_RDONLY);
sbin/hammer/cmd_pfs.c
118
fd = open(path, O_RDONLY);
sbin/hammer/cmd_pfs.c
286
fd = open(dirpath, O_RDONLY);
sbin/hammer/cmd_rebalance.c
83
fd = open(filesystem, O_RDONLY);
sbin/hammer/cmd_reblock.c
113
fd = open(filesystem, O_RDONLY);
sbin/hammer/cmd_snapshot.c
102
fsfd = open(dirpath, O_RDONLY);
sbin/hammer/cmd_snapshot.c
231
fsfd = open(".", O_RDONLY);
sbin/hammer/cmd_snapshot.c
240
fsfd = open(av[i], O_RDONLY);
sbin/hammer/cmd_snapshot.c
267
fsfd = open(dirpath, O_RDONLY);
sbin/hammer/cmd_snapshot.c
406
int fd = open(filesystem, O_RDONLY);
sbin/hammer/cmd_snapshot.c
513
fd = open(path, O_RDONLY);
sbin/hammer/cmd_softprune.c
155
fd = open(scan->filesystem, O_RDONLY);
sbin/hammer/cmd_synctid.c
67
fd = open(filesystem, O_RDONLY);
sbin/hammer/cmd_version.c
116
fd = open(av[0], O_RDONLY);
sbin/hammer/cmd_version.c
56
fd = open(av[0], O_RDONLY);
sbin/hammer/cmd_volume.c
120
fd = open(filesystem, O_RDONLY);
sbin/hammer/cmd_volume.c
67
fd = open(filesystem, O_RDONLY);
sbin/hammer/cmd_volume.c
76
volume = init_volume(device, O_RDONLY, -1);
sbin/hammer/cycle.c
45
if (CyclePath && (fd = open(CyclePath, O_RDONLY)) >= 0) {
sbin/hammer/hammer.c
527
hammer_parse_blkdevs(blkdevs, O_RDONLY);
sbin/hammer/hammer.c
552
hammer_parse_blkdevs(blkdevs, O_RDONLY);
sbin/hammer/hammer.c
557
__hammer_parse_blkdevs(blkdevs, O_RDONLY, 0, 1);
sbin/hammer/hammer.c
562
hammer_parse_blkdevs(blkdevs, O_RDONLY);
sbin/hammer/hammer.c
567
hammer_parse_blkdevs(blkdevs, O_RDONLY);
sbin/hammer/misc.c
114
fd = open(fs, O_RDONLY);
sbin/hammer/ondisk.c
96
volume->rdonly = (oflags == O_RDONLY);
sbin/hammer2/cmd_debug.c
1324
fd = open(path, O_RDONLY);
sbin/hammer2/cmd_destroy.c
82
fd = open(".", O_RDONLY);
sbin/hammer2/cmd_destroy.c
86
fd = open(npath, O_RDONLY);
sbin/hammer2/cmd_emergency.c
47
fd = open(av[0], O_RDONLY);
sbin/hammer2/cmd_info.c
282
if ((tfd = open("/dev/null", O_RDONLY)) >= 0) {
sbin/hammer2/cmd_info.c
319
fd = open(devpath, O_RDONLY);
sbin/hammer2/cmd_service.c
811
fd = open(mntpt, O_RDONLY);
sbin/hammer2/cmd_service.c
884
fd = open(path, O_RDONLY);
sbin/hammer2/cmd_snapshot.c
68
fd = open(path, O_RDONLY);
sbin/hammer2/cmd_stat.c
64
if ((fd = open(av[i], O_RDONLY)) < 0) {
sbin/hammer2/ondisk.c
212
fd = open(path, rdonly ? O_RDONLY : O_RDWR);
sbin/hammer2/subs.c
70
fd = open(sel_path, O_RDONLY, 0);
sbin/ifconfig/regdomain.c
629
fd = open(_PATH_REGDOMAIN, O_RDONLY);
sbin/init/init.c
1053
if ((fd = open(sp->se_device, O_RDONLY | O_NONBLOCK, 0)) < 0) {
sbin/iscontrol/auth_subr.c
157
if((fd = open("/dev/random", O_RDONLY)) != -1) {
sbin/jscan/jfile.c
138
jf->jf_open_flags = rw ? (O_RDWR|O_CREAT) : O_RDONLY;
sbin/jscan/jfile.c
256
jf->jf_fd = open(filename, O_RDONLY);
sbin/jscan/jfile.c
331
jf->jf_fd = open(filename, O_RDONLY);
sbin/jscan/jfile.c
58
jf->jf_open_flags = O_RDONLY;
sbin/jscan/jscan.c
229
if ((input_fd = open(av[optind], O_RDONLY)) != 0) {
sbin/jscan/subs.c
355
if ((fd = open(path, O_RDONLY)) >= 0) {
sbin/ldconfig/elfhints.c
198
if ((fd = open(hintsfile, O_RDONLY)) == -1) {
sbin/md5/md5.c
175
fd = open(fname, O_RDONLY);
sbin/md5/md5.c
209
fd = open(fname, O_RDONLY);
sbin/mount/mount.c
823
fd = open(path, O_RDONLY);
sbin/mount_cd9660/mount_cd9660.c
247
if ((fd = open(dev, O_RDONLY)) == -1)
sbin/natacontrol/natacontrol.c
387
fd = open_dev(argv[2], O_RDONLY);
sbin/natacontrol/natacontrol.c
406
fd = open_dev(argv[2], O_RDONLY);
sbin/natacontrol/natacontrol.c
466
fd = open_dev(argv[2], O_RDONLY);
sbin/natacontrol/natacontrol.c
472
fd = open_dev(argv[2], O_RDONLY);
sbin/natacontrol/natacontrol.c
619
if ((arfd = open(device, O_RDONLY)) == -1)
sbin/newfs/fscopy.c
190
} else if ((n = open(path, O_RDONLY)) < 0) {
sbin/newfs/fscopy.c
260
fd = open(".", O_RDONLY);
sbin/newfs/newfs.c
487
fsi = open(special, O_RDONLY);
sbin/newfs_msdos/mkfs_msdos.c
281
} else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) {
sbin/newfs_msdos/mkfs_msdos.c
437
if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) {
sbin/quotacheck/quotacheck.c
236
if ((fi = open(fsname, O_RDONLY, 0)) < 0) {
sbin/restore/dirs.c
554
if ((fd = open(name, O_RDONLY)) == -1)
sbin/restore/symtab.c
540
if ((fd = open(filename, O_RDONLY, 0)) < 0) {
sbin/restore/tape.c
192
mt = open(magtape, O_RDONLY, 0);
sbin/restore/tape.c
377
mt = open(magtape, O_RDONLY, 0);
sbin/savecore/savecore.c
380
fdkernin = open(getbootfile(), O_RDONLY, 0);
sbin/tunefs/tunefs.c
301
fi = open(file, O_RDONLY);
sbin/umount/umount.c
518
fd = open(device, O_RDONLY);
sbin/vinum/list.c
1301
driveno = open(partname, O_RDONLY);
sbin/vinum/list.c
1332
driveno = open(partname, O_RDONLY);
sbin/vinum/list.c
1378
fd = open(devicename, O_RDONLY);
share/examples/ses/srcs/getencstat.c
74
fd = open(*v, O_RDONLY);
share/examples/ses/srcs/getnobj.c
54
fd = open(name, O_RDONLY);
share/examples/ses/srcs/getobjmap.c
54
fd = open(*v, O_RDONLY);
share/examples/ses/srcs/getobjstat.c
58
fd = open(v[1], O_RDONLY);
stand/boot/common/boot.c
321
if ((fd = open(lbuf, O_RDONLY)) < 0)
stand/boot/common/commands.c
137
if ((hfd = open(buf, O_RDONLY)) < 0) {
stand/boot/common/commands.c
138
if ((hfd = rel_open("loader.help", NULL, O_RDONLY)) < 0) {
stand/boot/common/commands.c
449
if ((fd = rel_open(filename, &fullpath, O_RDONLY)) != -1) {
stand/boot/common/do_dloader.c
230
if (((fd = rel_open(filename, NULL, O_RDONLY)) == -1)) {
stand/boot/common/load_elf.c
109
if ((ef.fd = rel_open(filename, NULL, O_RDONLY)) == -1)
stand/boot/common/load_elf_obj.c
99
if ((ef.fd = rel_open(filename, NULL, O_RDONLY)) == -1)
stand/boot/common/ls.c
155
fd = rel_open(cp, NULL, O_RDONLY);
stand/boot/common/module.c
213
if ((fd = rel_open(name, NULL, O_RDONLY)) < 0) {
stand/boot/common/module.c
409
if ((fd = rel_open(name, NULL, O_RDONLY)) < 0) {
stand/boot/common/module.c
996
st.st_size > 100 * 1024 || (fd = rel_open(path, NULL, O_RDONLY)) < 0) {
stand/boot/pc32/btxld/btxld.c
200
if ((fdi[i] = open(fname, O_RDONLY)) == -1)
stand/lib/bzipfs.c
162
rawfd = open(bzfname, O_RDONLY);
stand/lib/gzipfs.c
191
rawfd = open(zfname, O_RDONLY);
stand/lib/hammer1.c
1066
hfs.fd = open(argv[1], O_RDONLY);
stand/lib/pager.c
138
if ((fd = open(fname, O_RDONLY)) == -1) {
stand/lib/splitfs.c
101
conffd = open(confname, O_RDONLY);
stand/lib/splitfs.c
142
if ((sf->filesc == 0) || ((sf->curfd = open(sf->filesv[0], O_RDONLY)) == -1)) {
stand/lib/splitfs.c
198
sf->curfd = open(sf->filesv[sf->curfile], O_RDONLY);
stand/lib/stat.c
42
fd = open(str, O_RDONLY);
sys/bus/cam/scsi/scsi_sa.c
488
softc->open_rdonly = (ap->a_oflags & O_RDWR) == O_RDONLY;
sys/dev/sound/midi/sequencer.c
1203
if (mode == O_RDONLY) {
sys/dev/sound/midi/sequencer.c
1244
if (mode == O_RDONLY)
sys/dev/virtual/vkernel/net/if_vke.c
807
int fd = open("/dev/urandom", O_RDONLY);
sys/kern/kern_checkpoint.c
522
if ((error = fp_vpopen(vp, O_RDONLY, &fp)) != 0) {
sys/libprop/prop_object.c
916
fd = open(fname, O_RDONLY, 0400);
sys/platform/vkernel64/platform/init.c
873
fd = open(fname, O_RDONLY|O_DIRECT, 0644);
sys/vfs/dirfs/dirfs_subr.c
589
flags |= O_RDONLY;
test/debug/bufqueues.c
136
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/fdpassing.c
57
if ((fd = open(av[i], O_RDONLY, 0666)) < 0) {
test/debug/h2chains.c
95
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/h2dio.c
94
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/h2inodes.c
94
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/kmapinfo.c
118
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/kshowprocs.c
87
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/ksyscalls.c
99
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/mbufinfo.c
130
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/ncptrace.c
121
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/psinfo.c
126
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/schedmon.c
106
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/seekbench.c
45
fd = open(av[1], O_RDONLY);
test/debug/slabinfo.c
118
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/vmobjinfo.c
119
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/vmobjinfo.c
134
swapfds[i] = open(av[optind + i], O_RDONLY);
test/debug/vmobjinfo.c
140
memfds = open("/dev/mem", O_RDONLY);
test/debug/vmpagehash.c
136
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/vmpageinfo.c
167
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/vmpagequeues.c
129
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/vmpqinactive.c
177
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/vnodeinfo.c
145
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/wildcardinfo.c
105
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/debug/zallocinfo.c
115
if ((kd = kvm_open(sysfile, corefile, NULL, O_RDONLY, "kvm:")) == NULL) {
test/interbench/interbench.c
1109
if ((tmp = open(name, O_RDONLY)) == -1) {
test/interbench/interbench.c
690
if ((tmp = open(name, O_RDONLY)) == -1)
test/kvm/kvm_file/test_kvm_file.c
78
kd = kvm_openfiles(file, core, NULL, O_RDONLY, errbuf);
test/nvmm/demo/toyvirt/elf.c
106
fd = open(path, O_RDONLY);
test/stress/fsstress/fsstress.c
1534
fd = open(".", O_RDONLY);
test/stress/fsstress/fsstress.c
1592
fd = open(".", O_RDONLY);
test/stress/fsstress/fsstress.c
1743
fd = open_path(&f, O_RDONLY);
test/stress/fsstress/fsstress.c
2182
fd = open_path(&f, O_RDONLY);
test/stress/stress2/testcases/mmap/mmap.c
84
if ((fdin = open(INPUTFILE, O_RDONLY)) < 0)
test/stress/stress2/testcases/openat/doat.c
155
i = open("tmp/foo", O_RDONLY | O_CREAT, 0644);
test/stress/stress2/testcases/openat/doat.c
161
rel_fd = open(relative_path, O_RDONLY);
test/stress/stress2/testcases/openat/doat.c
167
abs_fd = open(absolute_path, O_RDONLY);
test/stress/stress2/testcases/openat/doat.c
173
notd_fd = open(not_dir_path, O_RDONLY);
test/stress/stress2/testcases/openat/doat.c
179
exec_fd = open(not_dir_path, O_RDONLY);
test/stress/stress2/testcases/openat/doat.c
472
tests[9].tests[0].params[2].i = O_RDONLY;
test/stress/stress2/testcases/openat/doat.c
477
tests[9].tests[1].params[2].i = O_RDONLY;
test/stress/stress2/testcases/openat/doat.c
482
tests[9].tests[2].params[2].i = O_RDONLY;
test/stress/stress2/testcases/openat/doat.c
487
tests[9].tests[3].params[2].i = O_RDONLY;
test/stress/stress2/testcases/openat/doat.c
492
tests[9].tests[4].params[2].i = O_RDONLY | O_CREAT;
test/stress/stress2/testcases/openat/openat.c
121
if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1)
test/stress/stress2/testcases/openat/openat.c
146
if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1)
test/stress/stress2/testcases/openat/openat.c
68
if ((fd = open(path2, O_RDONLY)) == -1)
test/stress/stress2/testcases/openat/openat.c
99
if ((tfd = openat(fd, file, O_RDONLY|O_CREAT, 0660)) == -1)
test/stress/stress2/testcases/rename/rename.c
110
if ((tfd = open(file1, O_RDONLY|O_CREAT, 0660)) == -1)
test/stress/stress2/testcases/rw/rw.c
154
if ((fd = open(file, O_RDONLY)) == -1)
test/sysperf/lockmgr2.c
33
fd = open("/tmp/lockmgr2.test", O_RDONLY, 0666);
test/sysperf/lockmgr2.c
53
fd = open(path, O_RDONLY, 0666);
test/sysperf/loop4.c
59
int fd = open("/usr/share/dict/words", O_RDONLY);
test/sysperf/randread.c
105
fd = open(av[1], O_RDONLY);
test/sysperf/randread.c
86
fd = open(av[1], O_RDONLY);
test/testcases/posixipc/open_after_unlink/open_after_unlink.c
20
retval = sem_open_should_fail(TEST_PATH, O_RDONLY, 0777, 1, ENOENT);
test/testcases/posixipc/open_extra_flags/open_extra_flags.c
7
retval = sem_open_should_fail(TEST_PATH, O_RDONLY | O_DIRECT, 0777, 1, EINVAL);
test/testcases/posixipc/open_path_too_long/open_path_too_long.c
12
sem_open_should_fail(page, O_RDONLY, 0777, 1, ENAMETOOLONG);
test/testcases/priv/setreuid/setreuid.c
29
fd = open("/etc/hosts", O_RDONLY);
tools/diag/dumpvfscache/dumpvfscache.c
63
kvm_t *kvm = kvm_open(0, 0, 0, O_RDONLY, 0);
tools/multimedia/cxm/extract_fw/cxm_extract_fw.c
130
if ((fd = open(argv[i], O_RDONLY)) < 0)
tools/multimedia/cxm/setchannel/cxm_setchannel.c
190
tfd = open(buf, O_RDONLY);
tools/tools/ath/athdecode/main.c
68
fd = open(filename, O_RDONLY);
tools/tools/bus_autoconf/bus_load_file.c
46
f = open(fname, O_RDONLY);
tools/tools/net80211/w00t/prga/prga.c
98
fd = open(p->fname, O_RDONLY);
tools/tools/net80211/w00t/redir/redir.c
104
fd = open(p->fname, O_RDONLY);
tools/tools/net80211/wesside/wesside/wesside.c
1272
fd = open(path, O_RDONLY);
tools/tools/net80211/wesside/wesside/wesside.c
2435
fd = open(PRGA_FILE, O_RDONLY);
tools/tools/net80211/wesside/wesside/wesside.c
2450
fd = open(DICT_PATH, O_RDONLY);
tools/tools/net80211/wesside/wesside/wesside.c
275
fd = open(KEY_FILE, O_RDONLY);
tools/tools/net80211/wesside/wesside/wesside.c
924
fd = open(path, O_RDONLY);
tools/tools/net80211/wlaninject/wlaninject.c
286
if ((fd = open(fname, O_RDONLY)) == -1)
tools/tools/netrate/pktgenctl/pktgenctl.c
214
fd = open(dev, O_RDONLY);
usr.bin/brandelf/brandelf.c
118
if ((fd = open(argv[0], change || force ? O_RDWR : O_RDONLY, 0)) < 0) {
usr.bin/checkpt/checkpt.c
69
fd = open(filename, O_RDONLY);
usr.bin/cksum/cksum.c
103
if ((fd = open(fn, O_RDONLY, 0)) < 0) {
usr.bin/cmp/cmp.c
74
oflag = O_RDONLY;
usr.bin/diff/diffreg.c
458
else if ((ifd = open(tmp_file, O_RDONLY)) == -1)
usr.bin/dsynth/build.c
3067
fd1 = open(src, O_RDONLY|O_CLOEXEC);
usr.bin/dsynth/monitor.c
206
StatsFd = open(datfile, O_RDONLY);
usr.bin/find/main.c
143
if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) < 0)
usr.bin/finger/lprint.c
297
if ((fd = open(tbuf, O_RDONLY)) < 0 || fstat(fd, &sb) ||
usr.bin/fstat/fstat.c
236
if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, buf)) == NULL)
usr.bin/fsync/fsync.c
50
if ((fd = open(argv[i], O_RDONLY)) < 0) {
usr.bin/gcore/elfcore.c
126
if ((memfd = open(memname, O_RDONLY)) == -1)
usr.bin/gcore/elfcore.c
397
if ((fd = open(name, O_RDONLY)) == -1)
usr.bin/gcore/elfcore.c
408
if ((fd = open(name, O_RDONLY)) == -1)
usr.bin/gcore/elfcore.c
419
if ((fd = open(name, O_RDONLY)) == -1)
usr.bin/gcore/elfcore.c
450
if ((mapfd = open(mapname, O_RDONLY)) == -1)
usr.bin/gcore/gcore.c
148
efd = open(binfile, O_RDONLY, 0);
usr.bin/gencat/gencat.c
177
ifd = open(*argv, O_RDONLY);
usr.bin/gzip/gzip.c
1183
in = open(file, O_RDONLY);
usr.bin/gzip/gzip.c
1298
fd = open(file, O_RDONLY);
usr.bin/ipcs/ipcs.c
209
if ((kd = kvm_open(namelist, core, NULL, O_RDONLY, "ipcs")) == NULL)
usr.bin/kcollect/kcollect.c
816
DBM *db = dbm_open(datafile,(O_RDONLY),(S_IRUSR|S_IRGRP));
usr.bin/ktrdump/ktrdump.c
281
Mflag ? corefile : NULL, NULL, O_RDONLY, errbuf)) == NULL)
usr.bin/last/last.c
336
if ((wfd = open(file, O_RDONLY, 0)) < 0 || fstat(wfd, &stb) == -1)
usr.bin/ldd/ldd.c
113
if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
usr.bin/locate/locate/locate.c
276
if ((fd = open(path_fcodes, O_RDONLY)) == -1 ||
usr.bin/lockf/lockf.c
160
if ((fd = open(name, O_RDONLY|O_CREAT|O_EXLOCK|O_NONBLOCK, 0666)) == -1) {
usr.bin/lockf/lockf.c
218
if ((fd = open(name, O_RDONLY|O_EXLOCK)) == -1) {
usr.bin/look/look.c
138
if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb))
usr.bin/mail/collect.c
337
if ((nullfd = open("/dev/null", O_RDONLY, 0))
usr.bin/monitor/monitor.c
128
elm->fd = open(path, O_RDONLY);
usr.bin/mt/mt.c
175
if ((mtfd = open(tape, comp->c_ronly ? O_RDONLY : O_RDWR)) < 0)
usr.bin/netstat/main.c
517
kvmd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, buf);
usr.bin/nfsstat/nfsstat.c
134
if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY,
usr.bin/patch/inp.c
186
if ((ifd = open(filename, O_RDONLY)) < 0)
usr.bin/patch/inp.c
373
if ((tifd = open(TMPINNAME, O_RDONLY)) < 0)
usr.bin/patch/util.c
173
fromfd = open(from, O_RDONLY, 0);
usr.bin/patch/util.c
281
ttyfd = open(_PATH_TTY, O_RDONLY);
usr.bin/patch/util.c
65
fromfd = open(from, O_RDONLY);
usr.bin/pctrack/pctrack.c
159
Mflag ? corefile : NULL, NULL, O_RDONLY, errbuf)) == NULL)
usr.bin/pkill/pkill.c
321
kd = kvm_openfiles(execf, coref, NULL, O_RDONLY, buf);
usr.bin/quota/quota.c
533
if ((fd = open(qfpathname, O_RDONLY)) < 0) {
usr.bin/ruptime/ruptime.c
118
if ((fd = open(dp->d_name, O_RDONLY, 0)) < 0) {
usr.bin/rwho/rwho.c
108
f = open(dp->d_name, O_RDONLY);
usr.bin/sdiff/sdiff.c
156
ifd = open(source_file, O_RDONLY, 0);
usr.bin/shlock/shlock.c
197
if ((fd = open(file, O_RDONLY)) == -1) {
usr.bin/sort/file.c
636
fd = open(fsrc, O_RDONLY);
usr.bin/split/split.c
130
else if ((ifd = open(*argv, O_RDONLY, 0)) < 0)
usr.bin/systat/altqs.c
130
pf_fd = open("/dev/pf", O_RDONLY);
usr.bin/systat/main.c
131
kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
usr.bin/systat/pftop.c
241
fd = open("/dev/pf", O_RDONLY);
usr.bin/tcopy/tcopy.c
116
if ((outp = open(argv[1], op == VERIFY ? O_RDONLY :
usr.bin/tcopy/tcopy.c
124
if ((inp = open(inf, O_RDONLY, 0)) < 0)
usr.bin/tftp/main.c
362
fd = open(cp, O_RDONLY);
usr.bin/tftp/main.c
379
fd = open(argv[n], O_RDONLY);
usr.bin/top/m_dragonfly.c
278
if ((kd = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL)) == NULL)
usr.bin/truss/main.c
105
if ((fd = open(etype, O_RDONLY)) == -1) {
usr.bin/truss/x86_64-fbsd.c
274
fd = open(buf, O_RDONLY);
usr.bin/tset/misc.c
48
if ((fd = open(file, O_RDONLY, 0)) < 0)
usr.bin/undo/undo.c
616
fd = open(filename, O_RDONLY);
usr.bin/vmstat/vmstat.c
258
kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf);
usr.bin/w/w.c
195
if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, errbuf)) == NULL)
usr.bin/wc/wc.c
180
if ((fd = open(file, O_RDONLY)) < 0) {
usr.bin/xargs/xargs.c
616
if ((fd = open(_PATH_TTY, O_RDONLY)) == -1)
usr.bin/xargs/xargs.c
619
fd = open(_PATH_DEVNULL, O_RDONLY);
usr.bin/xinstall/xinstall.c
650
if (!devnull && (from_fd = open(from_name, O_RDONLY, 0)) < 0)
usr.bin/xinstall/xinstall.c
655
if ((to_fd = open(to_name, O_RDONLY, 0)) < 0)
usr.bin/xinstall/xinstall.c
696
to_fd = open(tempcopy ? tempfile : to_name, O_RDONLY, 0);
usr.bin/xinstall/xinstall.c
708
if ((to_fd = open(to_name, O_RDONLY, 0)) < 0)
usr.bin/xinstall/xinstall.c
776
if ((to_fd = open(to_name, O_RDONLY, 0)) < 0)
usr.sbin/acpi/acpiconf/acpiconf.c
51
acpifd = open(ACPIDEV, O_RDONLY);
usr.sbin/boot0cfg/boot0cfg.c
222
if ((fd = open(disk, O_RDONLY)) == -1)
usr.sbin/burncd/burncd.c
303
else if ((file = open(name, O_RDONLY, 0)) < 0)
usr.sbin/cdcontrol/cdcontrol.c
1270
fd = open (devbuf, O_RDONLY);
usr.sbin/cdcontrol/cdcontrol.c
1274
fd = open (devbuf, O_RDONLY);
usr.sbin/ckdist/ckdist.c
233
fd = open(filename, O_RDONLY);
usr.sbin/ckdist/ckdist.c
296
if ((fd = open(dname, O_RDONLY)) == -1)
usr.sbin/ckdist/ckdist.c
346
else if ((fd = open(dname, O_RDONLY)) == -1)
usr.sbin/clog/clog.c
136
fd = open(lname,O_RDONLY);
usr.sbin/config/main.c
444
if ((from_fd = open(from_name, O_RDONLY)) < 0)
usr.sbin/config/main.c
447
if ((to_fd = open(to_name, O_RDONLY)) < 0)
usr.sbin/cpucontrol/amd.c
118
fd = open(path, O_RDONLY, 0);
usr.sbin/cpucontrol/amd10h.c
150
fd = open(path, O_RDONLY, 0);
usr.sbin/cpucontrol/cpucontrol.c
154
fd = open(dev, O_RDONLY);
usr.sbin/cpucontrol/cpucontrol.c
204
fd = open(dev, O_RDONLY);
usr.sbin/cpucontrol/cpucontrol.c
318
fd = open(dev, op == OP_READ ? O_RDONLY : O_WRONLY);
usr.sbin/cpucontrol/cpucontrol.c
372
fd = open(dev, O_RDONLY);
usr.sbin/cpucontrol/intel.c
147
fd = open(path, O_RDONLY, 0);
usr.sbin/cpucontrol/via.c
140
fd = open(path, O_RDONLY, 0);
usr.sbin/cron/cron/database.c
196
if ((crontab_fd = open(tabname, O_RDONLY, 0)) < OK) {
usr.sbin/dconschat/dconschat.c
924
(dc->flags & F_RD_ONLY) ? O_RDONLY : O_RDWR, "dconschat");
usr.sbin/edquota/edquota.c
348
if ((fd = open(qfpathname, O_RDONLY)) < 0) {
usr.sbin/efivar/efivar.c
195
fd = open(fromfile, O_RDONLY);
usr.sbin/fdwrite/fdwrite.c
89
inputfd = open(optarg,O_RDONLY);
usr.sbin/fwcontrol/fwdv.c
265
fd = open(filename, O_RDONLY);
usr.sbin/ifmcstat/ifmcstat.c
120
if ((kvmd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, buf)) == NULL) {
usr.sbin/inetd/builtins.c
608
fakeid_fd = open(p, O_RDONLY | O_NONBLOCK);
usr.sbin/installer/libinstaller/survey.c
219
if ((fd = open(diskpath, O_RDONLY)) < 0)
usr.sbin/kbdcontrol/kbdcontrol.c
1000
fd = open(device, O_RDONLY);
usr.sbin/keyserv/keyserv.c
246
fd = open(ROOTKEY, O_RDONLY, 0);
usr.sbin/lpr/common_source/displayq.c
125
fd = open(pp->status_file, O_RDONLY|O_SHLOCK);
usr.sbin/lpr/common_source/displayq.c
182
fd = open(pp->status_file, O_RDONLY|O_SHLOCK);
usr.sbin/lpr/lpc/cmds.c
1066
fd = open(file, O_RDONLY);
usr.sbin/lpr/lpc/cmds.c
1075
fd = open(file, O_RDONLY|O_SHLOCK);
usr.sbin/lpr/lpd/printjob.c
599
if (lstat(file, &stb) < 0 || (fi = open(file, O_RDONLY)) < 0) {
usr.sbin/lpr/lpd/printjob.c
985
sfd = open(file, O_RDONLY);
usr.sbin/lpr/lpr/lpr.c
477
if ((i = open(arg, O_RDONLY)) < 0) {
usr.sbin/lpr/lpr/lpr.c
717
if ((fd = open(file, O_RDONLY)) < 0) {
usr.sbin/makefs/ffs.c
986
if ((ffd = open((char *)buf, O_RDONLY, 0444)) == -1) {
usr.sbin/makefs/hammer2.c
1246
fd = open(path, O_RDONLY);
usr.sbin/makefs/msdos/msdosfs_vnops.c
466
if ((fd = open(path, O_RDONLY)) == -1) {
usr.sbin/memcontrol/memcontrol.c
113
if ((memfd = open(_PATH_MEM, O_RDONLY)) == -1)
usr.sbin/mfiutil/mfi_flash.c
102
flash = open(av[1], O_RDONLY);
usr.sbin/mpsutil/mps_flash.c
157
fd = open(argv[2], O_RDONLY);
usr.sbin/mptable/mptable.c
350
if ( (pfd = open( _PATH_MEM, O_RDONLY )) < 0 )
usr.sbin/mtree/compare.c
393
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
usr.sbin/mtree/create.c
199
if ((fd = open(fname, O_RDONLY)) == -1)
usr.sbin/mtree/hash.c
87
fd = open(filename, O_RDONLY);
usr.sbin/pciconf/pciconf.c
186
O_RDWR : O_RDONLY, 0);
usr.sbin/pfctl/pfctl.c
1991
int mode = O_RDONLY;
usr.sbin/pfctl/pfctl.c
2140
mode = strchr("acdefkrz", ch) ? O_RDWR : O_RDONLY;
usr.sbin/pfctl/pfctl.c
2175
dev_fd = open(pf_device, O_RDONLY);
usr.sbin/ppp/ipcp.c
189
if ((fd = open(_PATH_RESCONF, O_RDONLY)) != -1) {
usr.sbin/ppp/main.c
343
if (open(_PATH_TTY, O_RDONLY) != STDIN_FILENO) {
usr.sbin/pstat/pstat.c
284
if ((kd = kvm_openfiles(nlistf, memf, NULL, O_RDONLY, buf)) == NULL)
usr.sbin/pw/cpdir.c
94
if ((infd = open(src, O_RDONLY)) == -1) {
usr.sbin/pwd_mkdb/pwd_mkdb.c
228
pw_db = dbopen(_PATH_MP_DB, O_RDONLY, 0, DB_HASH, NULL);
usr.sbin/pwd_mkdb/pwd_mkdb.c
674
if ((from_fd = open(from, O_RDONLY, 0)) < 0)
usr.sbin/resident/resident.c
170
if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
usr.sbin/rndcontrol/rndcontrol.c
54
fd = open("/dev/random", O_RDONLY, 0);
usr.sbin/rpc.ypxfrd/ypxfrd_server.c
133
if ((fp = open((char *)&buf, O_RDONLY)) == -1) {
usr.sbin/rpcbind/rpcb_svc_com.c
403
if ((fd = open("/dev/null", O_RDONLY)) == -1) {
usr.sbin/rpcbind/rpcbind.c
124
O_RDONLY|O_CREAT, 0444))) == -1)
usr.sbin/rtadvd/advcap.c
126
tf = open(cfile, O_RDONLY);
usr.sbin/sa/main.c
305
fd = open(pn, wr ? O_RDWR : O_RDONLY, 0);
usr.sbin/sa/pdb.c
64
saved_pacct_db = dbopen(_PATH_SAVACCT, O_RDONLY, 0, DB_BTREE,
usr.sbin/sa/usrdb.c
69
saved_usracct_db = dbopen(_PATH_USRACCT, O_RDONLY, 0, DB_BTREE,
usr.sbin/syslogd/syslogd.c
557
if ((fklog = open(_PATH_KLOG, O_RDONLY, 0)) >= 0)
usr.sbin/trpt/trpt.c
149
if ((memf = open(core, O_RDONLY)) < 0)
usr.sbin/tzsetup/tzsetup.c
731
fd1 = open(zoneinfo_file, O_RDONLY, 0);
usr.sbin/usbdump/usbdump.c
714
p->rfd = open(r_arg, O_RDONLY);
usr.sbin/usbdump/usbdump.c
893
p->fd = fd = open("/dev/bpf", O_RDONLY);
usr.sbin/vnconfig/vnconfig.c
295
vd = open(vnpath, O_RDONLY);
usr.sbin/watch/watch.c
162
mode = O_RDONLY;
usr.sbin/yp_mkdb/yp_mkdb.c
83
dbp = open_db(map, O_RDONLY);
usr.sbin/ypbind/ypbind.c
384
if ((yplockfd = (open(YPBINDLOCK, O_RDONLY|O_CREAT, 0444))) == -1)
usr.sbin/ypserv/yp_dblookup.c
400
dbp = dbopen(buf,O_RDONLY, PERM_SECURE, DB_HASH, NULL);