bin/cat/cat.c
249
fd = open(*argv, O_RDONLY|O_NONBLOCK, 0);
bin/cat/cat.c
263
else if ((fd = open(*argv, O_RDONLY, 0)) < 0) {
bin/chio/chio.c
165
if ((changer_fd = open(changer_name, O_RDWR, 0600)) == -1)
bin/cp/utils.c
117
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
bin/cp/utils.c
158
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
bin/cp/utils.c
160
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
bin/cp/utils.c
169
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
bin/csh/csh.c
460
nofile = open(tempv[0], O_RDONLY);
bin/csh/csh.c
744
if ((unit = open(f, O_RDONLY)) == -1)
bin/csh/csh.c
903
if ((fp = open(short2str(hfile), O_WRONLY | O_CREAT | O_TRUNC,
bin/csh/dol.c
829
if (open(tmp, O_RDWR | O_CREAT | O_TRUNC | O_EXCL, 0600) < 0) {
bin/csh/exec.c
291
if ((fd = open(f, O_RDONLY)) != -1) {
bin/csh/sem.c
545
if ((fd = open(tmp, O_RDONLY)) < 0) {
bin/csh/sem.c
559
(void)open(_PATH_DEVNULL, O_RDONLY);
bin/csh/sem.c
580
(fd = open(tmp, O_WRONLY | O_APPEND)) >= 0);
bin/csh/sem.c
582
(fd = open(tmp, O_WRONLY)) >= 0)
bin/csh/sem.c
593
if ((fd = open(tmp, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
bin/dd/dd.c
101
.op_open = open,
bin/dd/dd_hostops.c
43
.op_open = open,
bin/ksh/exec.c
1194
u = open(cp, flags, 0666);
bin/ksh/exec.c
1276
if (!(shf = h->shf) || (fd = open(h->name, O_RDONLY, 0)) < 0) {
bin/ksh/history.c
756
if ((fd = open(hname, O_WRONLY | O_CREAT | O_TRUNC | O_EXLOCK, 0600)) != -1) {
bin/ksh/history.c
854
if ((fd = open(hname, O_RDWR|O_CREAT|O_APPEND, 0600)) < 0)
bin/ksh/io.c
478
fd = open(pathx, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0600);
bin/ksh/jobs.c
617
int fd = open("/dev/null", 0);
bin/ksh/shf.c
54
fd = open(name, oflags, mode);
bin/ksh/tty.c
112
if ((tfd = open(devtty, O_RDWR, 0)) < 0) {
bin/mt/mt.c
168
if ((mtfd = open(tape, flags)) < 0)
bin/mv/mv.c
282
if ((from_fd = open(from, O_RDONLY, 0)) < 0) {
bin/mv/mv.c
287
open(to, O_CREAT | O_TRUNC | O_WRONLY, sbp->st_mode)) < 0) {
bin/pax/ar_io.c
170
} else if ((arfd = open(name, EXT_MODE, DMOD)) < 0)
bin/pax/ar_io.c
179
} else if ((arfd = open(name, AR_MODE, DMOD)) < 0)
bin/pax/ar_io.c
190
} else if ((arfd = open(name, APP_MODE, DMOD)) < 0)
bin/pax/ar_subs.c
1120
if ((fdsrc = open(arcn->org_name, O_RDONLY, 0)) < 0) {
bin/pax/ar_subs.c
621
if ((fd = open(arcn->org_name, O_RDONLY, 0)) < 0) {
bin/pax/dumptar.c
113
if ((fd = open(argv[1], O_RDONLY)) == -1)
bin/pax/file_subs.c
141
return (open(arcn->name, O_TRUNC | O_EXCL | O_RDWR, 0));
bin/pax/pax.c
270
cwdfd = open(".", O_RDONLY);
bin/pax/tty_subs.c
83
if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) {
bin/rcp/rcp.c
345
if ((fd = open(name, O_RDONLY, 0)) < 0)
bin/rcp/rcp.c
650
if ((ofd = open(np, O_WRONLY|O_CREAT, mode)) < 0) {
bin/rcp/rcp.c
834
ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC);
bin/rm/rm.c
406
if ((fd = open(file, O_RDWR|O_SYNC|O_RSYNC|O_NOFOLLOW, 0)) == -1)
bin/sh/histedit.c
439
fd = open(name, mode, S_IWUSR|S_IRUSR);
bin/sh/input.c
497
if ((fd = open(fname, O_RDONLY)) < 0)
bin/sh/jobs.c
1476
if (open(devnull, O_RDONLY) != 0)
bin/sh/jobs.c
1487
if (open(devnull, O_RDONLY) != 0)
bin/sh/jobs.c
179
if ((ttyfd = open("/dev/tty", O_RDWR)) == -1) {
bin/sh/main.c
388
if ((fd = open(name, O_RDONLY)) >= 0)
bin/sh/main.c
424
if ((fd = open(name, O_RDONLY)) >= 0)
bin/sh/redir.c
394
if ((f = open(fname, O_RDONLY|eflags)) < 0)
bin/sh/redir.c
404
if ((f = open(fname, O_RDWR|O_CREAT, 0666)) < 0)
bin/sh/redir.c
411
if ((f = open(fname, O_WRONLY)) == -1) {
bin/sh/redir.c
412
if ((f = open(fname, O_WRONLY|O_CREAT|O_EXCL,
bin/sh/redir.c
432
if ((f = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) < 0)
bin/sh/redir.c
438
if ((f = open(fname, O_WRONLY|O_CREAT|O_APPEND, 0666)) < 0)
bin/sh/show.c
148
fd = open(s, O_WRONLY|O_APPEND|O_CREAT, 0666);
bin/sh/var.c
1738
fd = open("/dev/urandom", 0);
bin/stty/key.c
212
r = f = open(_PATH_URANDOM, O_RDONLY, 0);
bin/stty/stty.c
86
if ((i.fd = open(optarg, O_RDONLY | O_NONBLOCK)) < 0)
common/dist/zlib/examples/gun.c
559
infile = open(inname, O_RDONLY, 0);
common/dist/zlib/examples/gun.c
572
outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666);
common/dist/zlib/examples/gzappend.c
270
gz.fd = open(name, O_RDWR, 0);
common/dist/zlib/examples/gzappend.c
397
fd = open(name, O_RDONLY, 0);
common/dist/zlib/examples/gzjoin.c
108
in->fd = open(name, O_RDONLY, 0);
common/dist/zlib/examples/gzlog.c
1016
fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
common/dist/zlib/examples/gzlog.c
354
while ((fd = open(log->path, O_CREAT | O_EXCL, 0644)) < 0) {
common/dist/zlib/examples/gzlog.c
629
fd = open(log->path, O_RDONLY, 0);
common/dist/zlib/examples/gzlog.c
758
if ((fd = open(log->path, O_RDONLY, 0)) < 0) {
common/dist/zlib/examples/gzlog.c
831
log->fd = open(log->path, O_RDWR | O_CREAT, 0644);
common/dist/zlib/examples/gzlog.c
955
fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
common/dist/zlib/examples/gzlog.c
965
fd = open(log->path, O_WRONLY | O_CREAT | O_TRUNC, 0644);
common/dist/zlib/gzlib.c
248
state->fd = open((const char *)path, oflag, 0666);
common/lib/libc/cdb/cdbr.c
130
if ((fd = open(path, O_RDONLY)) == -1)
common/lib/libprop/prop_intern.c
1003
fd = open(fname, O_RDONLY, 0400);
crypto/dist/ipsec-tools/src/racoon/dump.c
97
fd = open(path, O_WRONLY|O_CREAT|O_APPEND, 0600);
crypto/dist/ipsec-tools/src/racoon/eaytest.c
560
fd = open(buf, O_RDONLY);
crypto/dist/ipsec-tools/src/racoon/isakmp_unity.c
130
if ((fd = open(filename, O_RDONLY, 0)) == -1) {
crypto/dist/ipsec-tools/src/racoon/plainrsa-gen.c
256
fd = open(fname, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, S_IRUSR | S_IWUSR);
crypto/dist/ipsec-tools/src/racoon/plainrsa-gen.c
274
fdin = open(finput, O_RDONLY | O_NOFOLLOW);
crypto/dist/ipsec-tools/src/setkey/setkey.c
839
fd = open(fname, O_RDONLY);
dist/pf/libexec/tftp-proxy/filter.c
177
dev = open("/dev/pf", O_RDWR);
dist/pf/sbin/pfctl/pfctl.c
2136
dev = open(pf_device, mode);
dist/pf/sbin/pfctl/pfctl.c
2141
dev = open(pf_device, O_RDONLY);
dist/pf/sbin/pflogd/privsep.c
164
fd = open(filename,
dist/pf/sbin/pflogd/privsep.c
224
fd = open(ren, O_CREAT|O_EXCL, 0);
dist/pf/usr.sbin/authpf/authpf.c
122
dev = open(PATH_DEVFILE, O_RDWR);
dist/pf/usr.sbin/authpf/authpf.c
201
if ((pidfd = open(pidfile, O_RDWR|O_CREAT, 0644)) == -1 ||
dist/pf/usr.sbin/ftp-proxy/filter.c
205
dev = open("/dev/pf", O_RDWR);
dist/pf/usr.sbin/ftp-proxy/ipf.c
324
natfd = open(IPNAT_NAME, O_RDWR);
dist/pf/usr.sbin/ftp-proxy/npf.c
186
npf_fd = open(NPF_DEV_PATH, O_RDONLY);
distrib/utils/edlabel/edlabel.c
367
fd = open(dn, O_RDWR, 0);
distrib/utils/edlabel/edlabel.c
383
fd = open(dn, O_RDONLY, 0);
distrib/utils/libhack/opendir.c
64
if ((fd = open(name, O_RDONLY | O_NONBLOCK)) == -1)
distrib/utils/more/main.c
122
else if ((f = open(filename, O_RDONLY, 0)) < 0) {
distrib/utils/more/os.c
118
if (open(_PATH_TTY, O_RDONLY, 0) < 0)
distrib/utils/ssh/ssh.c
569
if ((newfd = open(file, otype, def_omode)) < 0) {
games/atc/log.c
124
score_fd = open(_PATH_SCORE, O_CREAT|O_RDWR|O_NOFOLLOW, 0664);
games/atc/log.c
126
score_fd = open(_PATH_SCORE, O_CREAT|O_RDWR, 0664);
games/backgammon/common_source/save.c
152
if ((fdesc = open(s, O_RDONLY)) == -1)
games/backgammon/common_source/save.c
94
if ((fdesc = open(fname, O_RDWR)) == -1 && errno == ENOENT) {
games/canfield/canfield/canfield.c
1646
dbfd = open(_PATH_SCORE, O_RDWR);
games/canfield/cfscores/cfscores.c
75
dbfd = open(_PATH_SCORE, O_RDONLY);
games/cribbage/instr.c
80
if ((fd = open(_PATH_INSTR, O_RDONLY)) == -1) {
games/dm/dm.c
267
if ((fd = open(_PATH_NOGAMES, O_RDONLY, 0)) >= 0) {
games/fish/fish.c
460
if ((fd = open(_PATH_INSTR, O_RDONLY)) == -1)
games/fortune/fortune/fortune.c
1059
if (fp->datfd < 0 && (fp->datfd = open(fp->datfile, O_RDONLY)) < 0)
games/fortune/fortune/fortune.c
1078
if ((fd = open(fp->posfile, O_RDONLY)) < 0 ||
games/fortune/fortune/fortune.c
1108
if ((fd = open(fp->datfile, O_RDONLY)) < 0)
games/fortune/fortune/fortune.c
488
if ((fd = open(path, O_RDONLY)) < 0) {
games/fortune/fortune/fortune.c
651
if ((fd = open(offensive, O_RDONLY)) < 0)
games/gomoku/pickmove.c
1464
clearcombo(struct combostr *cbp, int open)
games/gomoku/pickmove.c
1470
open = cbp->c_flags & C_OPEN_0;
games/gomoku/pickmove.c
1476
int n = open != 0 ? 6 : 5;
games/hack/hack.bones.c
158
if ((fd = open(bones, O_RDONLY)) < 0)
games/hack/hack.bones.c
91
if ((fd = open(bones, O_RDONLY)) >= 0) {
games/hack/hack.do.c
241
if ((fd = open(lock, O_RDONLY)) < 0) {
games/hack/hack.main.c
108
fd = open("/dev/null", O_RDONLY);
games/hack/hack.main.c
313
if ((fd = open(SAVEF, O_RDONLY)) >= 0 &&
games/hack/hack.main.c
570
if ((fd = open(RECORD, O_RDWR)) < 0) {
games/hack/hack.pager.c
376
int fd = open(fnam, O_RDONLY);
games/hack/hack.save.c
136
if ((ofd = open(lock, O_RDONLY)) < 0) {
games/hack/hack.unix.c
308
if ((fd = open(lock, O_RDONLY)) == -1) {
games/hack/makedefs.c
104
if ((fd = open(argv[1], O_RDONLY)) < 0) {
games/larn/io.c
494
if ((io_infd = open(str, O_RDONLY)) < 0) {
games/larn/io.c
517
if ((io_outfd = open(str, 2)) < 0) {
games/mille/save.c
156
if ((inf = open(file, O_RDONLY)) < 0) {
games/robots/main.c
124
score_wfd = open(Scorefile, O_RDWR);
games/robots/main.c
73
score_wfd = open(Scorefile, O_RDWR);
games/robots/score.c
228
if ((inf = open(Scorefile, O_RDONLY)) < 0) {
games/rogue/init.c
94
fd = open("/dev/null", O_RDONLY);
games/rogue/machdep.c
446
if ((fd = open(_PATH_SCOREFILE, O_RDONLY)) < 1) {
games/sail/main.c
72
fd = open("/dev/null", O_RDONLY);
games/snake/snake/snake.c
146
rawscores = open(SNAKE_PATH_RAWSCORES, O_RDWR|O_CREAT, 0664);
games/tetris/scores.c
404
sd = open(_PATH_SCOREFILE, mint, 0666);
games/tetris/tetris.c
146
fd = open("/dev/null", O_RDONLY);
games/trek/dumpgame.c
125
if ((fd = open("trek.dump", O_RDONLY)) < 0 ||
games/warp/term.c
127
devtty = open("/dev/tty",0);
games/wump/wump.c
773
if ((fd = open(_PATH_WUMPINFO, O_RDONLY)) == -1)
lib/libarch/alpha/alpha_bus_window.c
88
fd = open(_PATH_MEM, O_RDWR, 0600);
lib/libarch/alpha/alpha_pci_mem.c
103
fd = open(_PATH_MEM, O_RDWR, 0600);
lib/libc/citrus/citrus_mmap.c
64
if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1)
lib/libc/compat-43/creat.c
51
return(open(path, O_WRONLY|O_CREAT|O_TRUNC, mode));
lib/libc/db/db/dbfile.c
58
if ((fd = open(file, flags | O_CLOEXEC, mode)) == -1)
lib/libc/gen/daemon.c
71
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
lib/libc/gen/fts.c
1222
if (oldfd < 0 && (fd = open(path, O_RDONLY | O_CLOEXEC)) == -1)
lib/libc/gen/fts.c
217
if ((sp->fts_rfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
lib/libc/gen/fts.c
370
if ((p->fts_symfd = open(".", O_RDONLY | O_CLOEXEC, 0))
lib/libc/gen/fts.c
472
open(".", O_RDONLY | O_CLOEXEC, 0)) == -1) {
lib/libc/gen/fts.c
614
if ((fd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
lib/libc/gen/getcap.c
355
fd = open(*db_p, O_RDONLY | O_CLOEXEC, 0);
lib/libc/gen/getpass.c
110
if ((fd[0] = fd[1] = fd[2] = open(_PATH_TTY,
lib/libc/gen/initdir.c
156
if ((fd = open(name, O_RDONLY | O_CLOEXEC)) == -1) {
lib/libc/gen/nlist.c
122
fd = open(name, O_RDONLY | O_CLOEXEC, 0);
lib/libc/gen/opendir.c
81
if ((fd = open(name, O_RDONLY|O_DIRECTORY|O_NONBLOCK|O_CLOEXEC)) == -1)
lib/libc/gen/utmpx.c
346
fd = open(file, O_WRONLY|O_APPEND|O_SHLOCK|O_CLOEXEC);
lib/libc/gen/utmpx.c
349
if ((fd = open(file, O_CREAT|O_WRONLY|O_EXLOCK|O_CLOEXEC, 0644)) == -1)
lib/libc/gen/wordexp.c
142
if ((devnull = open(_PATH_DEVNULL, O_RDWR, 0666)) < 0)
lib/libc/gen/xsyslog.c
354
(fd = open(_PATH_CONSOLE,
lib/libc/gmon/gmon.c
446
fd = open(proffile, OPEN_FLAGS, 0666);
lib/libc/gmon/gmon.c
452
logfd = open("gmon.log", OPEN_FLAGS, 0664);
lib/libc/hash/hashhl.c
99
if ((fd = open(filename, O_RDONLY | O_CLOEXEC)) < 0)
lib/libc/md/mdXhl.c
82
f = open(filename, O_RDONLY | O_CLOEXEC, 0666);
lib/libc/nls/catopen.c
167
if ((fd = open(path, O_RDONLY|O_CLOEXEC)) == -1)
lib/libc/stdio/fopen.c
67
if ((f = open(file, oflags, DEFFILEMODE)) < 0)
lib/libc/stdio/freopen.c
106
f = open(file, oflags, DEFFILEMODE);
lib/libc/stdio/freopen.c
112
f = open(file, oflags, DEFFILEMODE);
lib/libc/stdio/gettemp.c
144
if ((*doopen = open(path, O_CREAT|O_EXCL|O_RDWR|oflags,
lib/libc/stdlib/malloc.c
119
{ if ((fdzero = open(_PATH_DEVZERO, O_RDWR | O_CLOEXEC, 0000)) == -1) \
lib/libc/stdlib/posix_openpt.c
45
return open("/dev/ptmx", oflag);
lib/libc/sys/adjtime.c
79
__clockctl_fd = open(_PATH_CLOCKCTL, O_WRONLY | O_CLOEXEC, 0);
lib/libc/sys/clock_settime.c
81
__clockctl_fd = open(_PATH_CLOCKCTL, O_WRONLY | O_CLOEXEC, 0);
lib/libc/sys/ntp_adjtime.c
89
__clockctl_fd = open(_PATH_CLOCKCTL, O_WRONLY | O_CLOEXEC, 0);
lib/libc/sys/settimeofday.c
80
__clockctl_fd = open(_PATH_CLOCKCTL, O_WRONLY | O_CLOEXEC, 0);
lib/libc/time/localtime.c
1087
dd = open(tzdirslash, /*NOTREACHED*/
lib/libc/time/localtime.c
1143
fid = OPENAT_TZDIR ? openat(dd, relname, oflags) : open(name, oflags);
lib/libc/time/zic.c
1652
int fd = open(*outname, oflags, creat_perms);
lib/libc/yp/yplib.c
118
if ((fd = open(YPBINDLOCK, O_RDONLY | O_CLOEXEC)) == -1)
lib/libc/yp/yplib.c
158
if ((fd = open(path, O_RDONLY | O_CLOEXEC)) == -1) {
lib/libdm/libdm_ioctl.c
116
if ((fd = open(path, O_RDWR)) < 0)
lib/libedit/history.c
893
if ((i = open(fname, O_WRONLY|O_CREAT|O_TRUNC,
lib/libexecinfo/backtrace.c
75
return open(pathname, flags);
lib/libintl/gettext.c
601
fd = open(path, O_RDONLY);
lib/libkvm/kvm.c
342
kd->nlfd = open(_PATH_KSYMS, O_RDONLY | O_CLOEXEC, 0);
lib/libkvm/kvm.c
344
if ((kd->nlfd = open(uf, O_RDONLY | O_CLOEXEC, 0)) < 0) {
lib/libkvm/kvm.c
353
if ((kd->pmfd = open(mf, flag | O_CLOEXEC, 0)) < 0) {
lib/libkvm/kvm.c
367
if ((kd->vmfd = open(_PATH_KMEM, flag | O_CLOEXEC, 0)) < 0) {
lib/libkvm/kvm.c
372
if ((kd->swfd = open(sf, flag | O_CLOEXEC, 0)) < 0) {
lib/libnvmm/libnvmm.c
163
nvmm_fd = open("/dev/nvmm", O_RDONLY | O_CLOEXEC);
lib/libnvmm/libnvmm.c
186
nvmm_fd = open("/dev/nvmm", O_WRONLY | O_CLOEXEC);
lib/libossaudio/oss4_mixer.c
109
if ((newfd = open(tmpai->devnode, O_WRONLY)) < 0) {
lib/libossaudio/oss4_mixer.c
110
if ((newfd = open(tmpai->devnode, O_RDONLY)) < 0) {
lib/libossaudio/oss4_mixer.c
177
newfd = open(devname, O_RDONLY);
lib/libossaudio/oss4_mixer.c
233
if ((newfd = open(devname, O_RDONLY)) < 0)
lib/libossaudio/oss4_mixer.c
266
if ((newfd = open(devname, O_RDONLY)) < 0)
lib/libossaudio/oss4_mixer.c
274
if ((newfd = open(devname, O_RDONLY)) < 0)
lib/libossaudio/oss4_mixer.c
393
if ((newfd = open(devname, O_RDONLY)) < 0)
lib/libossaudio/oss4_mixer.c
451
if ((newfd = open(devname, O_RDWR)) < 0)
lib/libossaudio/oss4_mixer.c
522
if ((newfd = open(devname, O_RDWR)) < 0)
lib/libossaudio/oss4_mixer.c
599
if ((tmpfd = open(devname, O_RDONLY)) != -1 ||
lib/libossaudio/oss4_mixer.c
600
(tmpfd = open(devname, O_WRONLY)) != -1) {
lib/libossaudio/oss4_mixer.c
620
if ((tmpfd = open(devname, O_RDONLY)) != -1) {
lib/libp2k/p2k.c
297
PUFFSOP_SET(pops, p2k, node, open);
lib/libpam/modules/pam_lastlog/pam_lastlog.c
356
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) == -1) {
lib/libpam/modules/pam_nologin/pam_nologin.c
112
if ((fd = open(nologin, O_RDONLY, 0)) == -1) {
lib/libpam/modules/pam_ssh/pam_ssh.c
325
(void)open(_PATH_DEVNULL, O_RDONLY);
lib/libpam/modules/pam_unix/pam_unix.c
374
pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
lib/libperfuse/perfuse.c
183
return open(path, flags, mode);
lib/libperfuse/perfuse.c
499
PUFFSOP_SET(pops, perfuse, node, open);
lib/libpthread/pthread_cancelstub.c
128
__typeof(open) _sys_open;
lib/libpthread/pthread_cancelstub.c
804
__strong_alias(_open, open)
lib/libpuffs/null.c
103
fd = open(path, O_WRONLY);
lib/libpuffs/null.c
113
fd = open(path, O_WRONLY);
lib/libpuffs/null.c
342
fd = open(PCNPATH(pcn), O_RDWR | O_CREAT | O_TRUNC);
lib/libpuffs/null.c
637
fd = open(PNPATH(pn), O_RDONLY);
lib/libpuffs/puffs.c
485
fd = open(_PATH_DEVNULL, O_RDWR, 0);
lib/libpuffs/puffs.c
599
fd = open(_PATH_PUFFS, O_RDWR);
lib/libpuffs/puffs.c
79
FILLOP(open, OPEN);
lib/libquota/quota_oldfiles.c
366
fd = open(path, O_RDWR);
lib/libquota/quota_oldfiles.c
368
fd = open(path, O_RDONLY);
lib/librefuse/refuse.c
1245
PUFFSOP_SET(pops, puffs_fuse, node, open);
lib/librefuse/refuse/fs.c
398
if (((const struct __CONCAT(fuse_operations_v,VER)*)fs->op)->open) \
lib/librefuse/refuse/fs.c
399
return ((const struct __CONCAT(fuse_operations_v,VER)*)fs->op)->open(path, fi->flags); \
lib/librefuse/refuse/fs.c
408
if (((const struct __CONCAT(fuse_operations_v,VER)*)fs->op)->open) \
lib/librefuse/refuse/fs.c
409
return ((const struct __CONCAT(fuse_operations_v,VER)*)fs->op)->open(path, fi); \
lib/librefuse/refuse/v11.h
65
int (*open) (const char *, int);
lib/librefuse/refuse/v21.h
61
int (*open) (const char *, int);
lib/librefuse/refuse/v22.h
65
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v23.h
65
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v25.h
61
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v26.h
61
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v28.h
61
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v29.h
61
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v30.h
69
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v34.h
59
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v35.h
59
int (*open) (const char *, struct fuse_file_info *);
lib/librefuse/refuse/v38.h
59
int (*open) (const char *, struct fuse_file_info *);
lib/librmt/rmtlib.c
644
return open(path, oflag, mode);
lib/librmt/rmtlib.c
837
return open(path, O_CREAT | O_TRUNC | O_WRONLY, mode);
lib/librt/shm.c
129
return open(path, oflag | O_CLOEXEC | O_NOFOLLOW, mode);
lib/librt/shm.c
69
fd = open(SHMFS_DIR_PATH, O_DIRECTORY|O_RDONLY);
lib/librumpclient/rumpclient.c
1244
int fd = open("/dev/null", O_RDWR);
lib/librumpclient/rumpclient.c
406
int fd = open("/proc/self/comm", O_RDONLY);
lib/librumpuser/rumpuser_daemonize.c
150
fd = open(_PATH_DEVNULL, O_RDWR);
lib/librumpuser/rumpuser_daemonize.c
63
if ((fd = open(path, O_WRONLY|O_CREAT)) == -1)
lib/librumpuser/rumpuser_daemonize.c
69
if ((fd = open(path, O_WRONLY|O_CREAT)) == -1)
lib/librumpuser/rumpuser_file.c
123
fd = open(path, O_RDONLY);
lib/librumpuser/rumpuser_file.c
211
KLOCK_WRAP(fd = open(path, flags, 0644));
lib/librumpuser/rumpuser_random.c
66
random_fd = open(random_device, O_RDONLY);
lib/libskey/skeylogin.c
488
if ((fd = open(_SKEY_RAND_FILE_PATH_, O_RDONLY)) != -1
lib/libukfs/ukfs.c
258
devfd = open(devpath, O_RDONLY);
lib/libukfs/ukfs.c
453
devfd = open(devpath, rdonly ? O_RDONLY : O_RDWR);
lib/libutil/compat/compat_login.c
69
if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) {
lib/libutil/compat/compat_login.c
74
if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
lib/libutil/getfsspecname.c
93
if ((fd = open(rbuf, O_RDONLY)) == -1) {
lib/libutil/login.c
61
if (tty > 0 && (fd = open(_PATH_UTMP, O_WRONLY|O_CREAT, 0644)) >= 0) {
lib/libutil/login.c
66
if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) >= 0) {
lib/libutil/logout.c
61
if ((fd = open(_PATH_UTMP, O_RDWR, 0)) < 0)
lib/libutil/logwtmp.c
64
if ((fd = open(_PATH_WTMP, O_WRONLY|O_APPEND, 0)) < 0)
lib/libutil/opendisk.c
118
return __opendisk(path, flags, buf, buflen, iscooked, open);
lib/libutil/passwd.c
124
fd = open(filename, O_WRONLY|O_CREAT|O_EXCL, 0600);
lib/libutil/passwd.c
127
fd = open(filename, O_WRONLY|O_CREAT|O_EXCL,
lib/libutil/pidfile.c
210
else if ((fd = open(path, O_RDONLY | O_NONBLOCK)) == -1)
lib/libutil/pidfile.c
263
if ((fd = open(path, opts, 0644)) == -1)
lib/libutil/pidlock.c
122
if ((f = open(lockfile, O_RDONLY, 0)) != -1) {
lib/libutil/pidlock.c
88
if ((f = open(tempfile, O_WRONLY|O_CREAT|O_TRUNC, 0600)) == -1)
lib/libutil/pty.c
106
if ((master = open(line, O_RDWR, 0)) == -1) {
lib/libutil/pty.c
119
(slave = open(line, O_RDWR, 0)) != -1) {
lib/libutil/pty.c
81
if ((master = open("/dev/ptm", O_RDWR)) != -1) {
lib/libutil/ttymsg.c
111
if ((fd = open(device, O_WRONLY|O_NONBLOCK, 0)) < 0) {
lib/libwrap/shell_cmd.c
87
if (open("/dev/null", 2) != 0) {
lib/lua/gpio/gpio.c
73
*fd = open(luaL_checkstring(L, -2), O_RDWR);
libexec/atrun/atrun.c
272
if ((fd_out = open(filename,
libexec/atrun/atrun.c
346
if (open(filename, O_RDONLY) != STDIN_FILENO)
libexec/ftpd/conf.c
906
if ((fd = open(fn, O_RDWR | O_CREAT, 0600)) == -1)
libexec/ftpd/ftpd.c
768
xferlogfd = open(xferlogname, O_WRONLY | O_APPEND | O_CREAT,
libexec/ftpd/logutmp.c
105
&& (fd = open(_PATH_UTMP, O_RDWR|O_CREAT, 0644)) < 0))
libexec/ftpd/logwtmp.c
113
if ((fdx = open(wf, O_WRONLY|O_APPEND, 0)) == -1)
libexec/ftpd/logwtmp.c
77
if ((fd = open(wf, O_WRONLY|O_APPEND, 0)) == -1)
libexec/getty/main.c
232
while ((i = open(ttyn, O_RDWR)) == -1) {
libexec/httpd/bozohttpd.c
1213
mapfile = open(REMAP_FILE, O_RDONLY, 0);
libexec/httpd/bozohttpd.c
1836
fd = open(file, O_RDONLY);
libexec/httpd/bozohttpd.c
1845
fd = open(file, O_RDONLY);
libexec/httpd/dir-index-bozo.c
209
fd = open(buf, O_RDONLY);
libexec/identd/identd.c
900
if ((fd = open(path, O_RDONLY|O_NONBLOCK|O_NOFOLLOW, 0)) < 0) {
libexec/identd/ipf.c
71
if ((dev = open(IPNAT_NAME, O_RDONLY)) == -1) {
libexec/identd/npf.c
83
if ((dev = open("/dev/npf", O_RDWR)) == -1) {
libexec/identd/pf.c
69
if ((dev = open("/dev/pf", O_RDWR)) == -1) {
libexec/ld.elf_so/load.c
145
if ((fd = open(filepath, O_RDONLY)) == -1) {
libexec/ld.elf_so/paths.c
347
if ((fd = open(fname, O_RDONLY)) == -1) {
libexec/ld.elf_so/xmalloc.c
395
fd = open("/dev/zero", O_RDWR, 0);
libexec/lfs_cleanerd/cleansrv.c
173
fd = open("/var/run/lfs_cleanerd.pid", O_RDONLY);
libexec/mail.local/mail.local.c
223
if((lfd = open(lpath, O_CREAT|O_WRONLY|O_EXCL,
libexec/mail.local/mail.local.c
241
if ((mbfd = open(path, O_APPEND|O_WRONLY|O_EXLOCK|O_NOFOLLOW,
libexec/mail.local/mail.local.c
245
(mbfd = open(path, O_APPEND|O_CREAT|O_WRONLY|O_EXLOCK|O_EXCL,
libexec/makewhatis/makewhatis.c
378
outfd = open(whatisdb_new, O_WRONLY|O_CREAT|O_EXCL,
libexec/makewhatis/makewhatis.c
784
((devnull = open(_PATH_DEVNULL, O_WRONLY, 0)) < 0))
libexec/rshd/rshd.c
284
int t = open(_PATH_TTY, O_RDWR);
libexec/telnetd/sys_term.c
454
t = open(_PATH_TTY, O_RDWR);
libexec/telnetd/telnetd.c
884
t = open(_PATH_TTY, O_RDWR);
libexec/tftpd/tftpd.c
895
fd = open(filename, mode == RRQ ? O_RDONLY : O_WRONLY | trunc | create,
libexec/utmp_update/utmp_update.c
137
fd = open(tty, O_RDONLY|O_NONBLOCK, 0);
regress/sys/fs/lfs/9994/9994_f.c
114
testfd = open(buf, O_RDWR | O_CREAT, 0644);
regress/sys/fs/lfs/9994/9994_f.c
125
controlfd = open(buf, O_RDWR | O_CREAT, 0644);
regress/sys/fs/lfs/ckckp/ckckp.c
52
fd = open(argv[1], 0, 0);
regress/sys/kern/kqueue/vnode/vnode.c
56
fd = open(argv[1], O_RDONLY|O_CREAT, 0644);
regress/sys/kern/kqueue/vnode/vnode.c
62
if ((fd = open(buffer, O_RDONLY)) < 0)
regress/sys/kern/kqueue/vnode/write.c
51
fd = open(argv[1], O_WRONLY);
regress/sys/kern/unfdpass/unfdpass.c
150
if ((fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666)) == -1)
regress/sys/kern/unfdpass/unfdpass.c
395
if ((fd = open(fname, O_RDONLY, 0666)) == -1)
regress/sys/kern/unfdpass/unfdpass.c
404
if ((fd = open(dirname, O_RDONLY, 0)) == -1) {
sbin/amrctl/amrctl.c
650
fd = open(filename, O_RDONLY);
sbin/badsect/badsect.c
143
if ((fsi = open(name, O_RDONLY)) == -1)
sbin/bioctl/bioctl.c
168
fd = open("/dev/bio", O_RDWR);
sbin/blkdiscard/blkdiscard.c
173
int fd = open(name, O_RDWR);
sbin/ccdconfig/ccdconfig.c
501
if ((fd = open(path, O_RDWR, 0640)) < 0) {
sbin/ccdconfig/ccdconfig.c
546
fd = open(dev, O_RDONLY);
sbin/cgdconfig/cgdconfig_hostops.c
43
.op_open = open,
sbin/cgdconfig/prog_ops.h
53
#define prog_open open
sbin/clri/clri.c
98
if ((fd = open(fs, O_RDWR, 0)) < 0)
sbin/devpubd/devpubd.c
290
drvctl_fd = open(DRVCTLDEV, O_RDWR);
sbin/disklabel/main.c
373
f = open(path, flags, 0);
sbin/drvctl/drvctl.c
113
fd = open(DRVCTLDEV, OPEN_MODE(mode), 0);
sbin/dump/main.c
501
if ((diskfd = open(disk, O_RDONLY)) < 0) {
sbin/dump/main.c
517
if ((diskfd = open(disk, O_RDONLY)) < 0) {
sbin/dump/snapshot.c
117
fd = open(fss.fss_bstore, O_RDWR);
sbin/dump/snapshot.c
122
fd = open(fss.fss_bstore, O_CREAT|O_EXCL|O_WRONLY, 0600);
sbin/dump/snapshot.c
155
if ((fd = open(fss_dev, O_RDWR, 0)) < 0)
sbin/dump/tape.c
406
while ((f = open(tape, 0)) < 0)
sbin/dump/tape.c
440
if ((f = open(tape, 0)) >= 0) {
sbin/dump/tape.c
672
pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
sbin/dump/tape.c
675
open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
sbin/dump/tape.c
825
if ((diskfd = open(disk_dev, O_RDONLY)) < 0)
sbin/dump_lfs/lfs_inode.c
415
root_fd = open(mpname, O_RDONLY, 0);
sbin/efi/gptsubr.c
340
fd = open(p, O_RDONLY);
sbin/efi/gptsubr.c
504
int fd = open(p, O_RDONLY);
sbin/efi/main.c
549
efi_fd = open(_PATH_EFI, O_RDONLY);
sbin/efi/utils.c
422
fd = open(fname, O_RDONLY);
sbin/fdisk/fdisk.c
1065
if ((bfd = open(boot_path, O_RDONLY)) < 0 || fstat(bfd, &st) == -1) {
sbin/fdisk/fdisk.c
2505
fd = open(disk, flags, 0);
sbin/fdisk/fdisk.c
2519
wfd = open(disk_file, update ? O_RDWR|O_CREAT : O_RDONLY, 0777);
sbin/fsck_ext2fs/setup.c
130
if ((fsreadfd = open(dev, O_RDONLY)) < 0) {
sbin/fsck_ext2fs/setup.c
136
if (nflag || (fswritefd = open(dev, O_WRONLY)) < 0) {
sbin/fsck_ffs/setup.c
114
if ((fsreadfd = open(dev, O_RDONLY)) < 0) {
sbin/fsck_ffs/setup.c
118
if (nflag || (fswritefd = open(dev, O_WRONLY)) < 0) {
sbin/fsck_ffs/setup.c
143
fd = open(origdev, O_RDONLY);
sbin/fsck_lfs/kernelops.c
72
.ko_open = open,
sbin/fsck_lfs/setup.c
192
if ((fsreadfd = open(dev, open_flags)) < 0) {
sbin/fsck_msdos/check.c
59
dosfs = open(filename, rdonly ? O_RDONLY : O_RDWR, 0);
sbin/fsck_msdos/check.c
61
dosfs = open(filename, O_RDONLY, 0);
sbin/fsck_v7fs/fsck_v7fs.c
154
if ((fd = open(device, openflags)) == -1) {
sbin/fsck_v7fs/fsck_v7fs.c
167
if ((fd = open(device, openflags)) == -1) {
sbin/fsdb/fsdb.c
1759
wrinfo.fd = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, 0644);
sbin/fsdb/fsdb.c
572
wrinfo.fd = open(argv[1], O_WRONLY | O_TRUNC | O_CREAT, 0644);
sbin/fsirand/fsirand.c
269
fd = open(special, openflags);
sbin/gpt/biosboot.c
124
if ((bfd = open(bp, O_RDONLY)) < 0 || fstat(bfd, &st) == -1) {
sbin/gpt/gpt.c
520
gpt->fd = open(dev, O_RDWR|O_EXCL|O_CREAT, 0644);
sbin/gpt/gpt_uuid.c
292
fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
sbin/init/init.c
407
fd = open(_PATH_CONSOLE, O_WRONLY);
sbin/init/init.c
629
if ((fd = open(name, O_RDWR)) == -1) {
sbin/iscsictl/iscsic_main.c
549
if ((driver = open(DEVICE, O_RDONLY)) < 0)
sbin/iscsid/iscsid_main.c
139
if ((driver = open(DEVICE, O_RDONLY)) < 0) {
sbin/ldconfig/ldconfig.c
526
if ((fd = open(_PATH_LD_HINTS, O_RDONLY, 0)) == -1) {
sbin/luactl/luactl.c
85
if ((devfd = open(_PATH_DEV_LUA, O_RDWR)) == -1)
sbin/mount/mount.c
736
if ((fd = open(str, O_RDONLY)) == -1) {
sbin/mount/mount.c
753
if ((fd = open(buf, O_RDONLY)) == -1)
sbin/mount_portal/pt_file.c
154
fd = open(pbuf, O_RDWR | O_CREAT, 0666);
sbin/mount_portal/pt_file.c
162
fd = open(pbuf, O_RDONLY, 0);
sbin/mount_portal/puffs_portal.c
444
PUFFSOP_SET(pops, portal, node, open);
sbin/mount_qemufwcfg/fwcfg.c
187
.open = fwcfg_open,
sbin/mount_qemufwcfg/fwcfg.c
268
fwcfg_fd = open(path, O_RDWR);
sbin/newfs/newfs.c
498
fsi = open(special, fl, 0777);
sbin/newfs/newfs.c
518
fso = open(special, O_WRONLY, 0);
sbin/newfs_ext2fs/newfs_ext2fs.c
245
fsi = open(special, fl, 0777);
sbin/newfs_ext2fs/newfs_ext2fs.c
260
fso = open(special, O_WRONLY, 0);
sbin/newfs_lfs/newfs.c
288
fso = open(special, O_RDWR, DEFFILEMODE);
sbin/newfs_lfs/newfs.c
291
fso = open(special, O_CREAT | O_RDWR, DEFFILEMODE);
sbin/newfs_lfs/newfs.c
306
fsi = open(special, O_RDONLY);
sbin/newfs_msdos/mkfs_msdos.c
286
fd = open(fname, oflags, 0644);
sbin/newfs_msdos/mkfs_msdos.c
297
} else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1 ||
sbin/newfs_msdos/mkfs_msdos.c
471
if ((fd1 = open(bname, O_RDONLY)) == -1 || fstat(fd1, &sb)) {
sbin/newfs_sysvbfs/newfs_sysvbfs.c
134
fd = open(device, O_RDWR|O_CREAT|O_TRUNC, 0666);
sbin/newfs_sysvbfs/newfs_sysvbfs.c
95
if ((fd = open(device, O_RDWR)) == -1) {
sbin/newfs_udf/udf_core.c
3338
if ((dev_fd = open(dev_name, O_RDONLY, 0)) == -1) {
sbin/newfs_udf/udf_core.c
3344
if ((dev_fd = open(dev_name, O_RDWR, 0)) == -1) {
sbin/newfs_udf/udf_core.c
3346
dev_fd = open(dev_name, O_RDONLY, 0);
sbin/newfs_udf/udf_core.c
3357
dev_fd = open(dev_name, O_RDWR | O_CREAT | O_TRUNC, 0666);
sbin/newfs_v7fs/newfs_v7fs.c
130
if ((fd = open(device, O_RDWR)) == -1) {
sbin/newfs_v7fs/newfs_v7fs.c
166
fd = open(device, O_RDWR|O_CREAT|O_TRUNC, 0666);
sbin/nvmectl/firmware.c
85
if ((fd = open(path, O_RDONLY)) < 0)
sbin/nvmectl/nvmectl.c
213
*fd = open(full_path, O_RDWR);
sbin/nvmectl/wdc.c
125
fd2 = open(tmpl, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sbin/raidctl/prog_ops.h
52
#define prog_open open
sbin/raidctl/raidctl_hostops.c
44
.op_open = open,
sbin/resize_ffs/resize_ffs.c
2213
fd = open(special, O_RDWR, 0);
sbin/resize_lfs/resize_lfs.c
104
devfd = open(rdev, O_RDONLY);
sbin/resize_lfs/resize_lfs.c
122
rootfd = open(fsname, O_RDONLY);
sbin/restore/dirs.c
580
if ((fd = open(name, O_RDONLY)) == -1)
sbin/restore/dirs.c
723
if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0666)) < 0) {
sbin/restore/symtab.c
558
if ((fd = open(filename, O_RDONLY, 0)) < 0) {
sbin/restore/tape.c
306
mt = open(magtape, O_RDONLY, 0);
sbin/restore/tape.c
473
mt = open(magtape, O_RDONLY, 0);
sbin/restore/tape.c
792
if (!Nflag && (ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
sbin/rndctl/rndctl.c
150
if ((fd_random = open(_PATH_URANDOM, O_RDONLY)) == -1) {
sbin/rndctl/rndctl.c
267
if ((fd_seed = open(tmp, O_CREAT|O_TRUNC|O_WRONLY, 0600)) == -1)
sbin/rndctl/rndctl.c
309
if ((fd_new = open(tmp, O_CREAT|O_TRUNC|O_WRONLY, 0600)) == -1) {
sbin/rndctl/rndctl.c
317
if ((fd_old = open(filename, O_RDWR)) == -1) {
sbin/rndctl/rndctl.c
320
(fd_old = open(filename, O_RDONLY)) == -1)
sbin/rndctl/rndctl.c
388
if ((fd_random = open(_PATH_URANDOM, O_WRONLY)) == -1)
sbin/rndctl/rndctl.c
437
fd = open(_PATH_URANDOM, O_RDONLY, 0644);
sbin/rndctl/rndctl.c
502
fd = open(_PATH_URANDOM, O_RDONLY, 0644);
sbin/rndctl/rndctl.c
554
fd = open(_PATH_URANDOM, O_RDONLY, 0644);
sbin/route/prog_ops.h
93
#define prog_open open
sbin/route/route_hostops.c
48
.op_open = open,
sbin/routed/trace.c
208
fd = open(_PATH_DEVNULL, O_RDWR);
sbin/savecore/savecore.c
700
if ((ifd = open(rawp, O_RDONLY)) == -1) {
sbin/savecore/savecore.c
905
if ((fd = open(name, rw, 0)) < 0) {
sbin/savecore/savecore.c
929
fd = open(file, O_WRONLY | O_CREAT | O_TRUNC, mode);
sbin/scan_ffs/scan_ffs.c
416
ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC);
sbin/scan_ffs/scan_ffs.c
557
fd = open(fpath, O_RDONLY | O_DIRECT);
sbin/shutdown/shutdown.c
558
if ((fastfd = open(_PATH_FASTBOOT, O_WRONLY|O_CREAT|O_TRUNC,
sbin/shutdown/shutdown.c
580
if ((logfd = open(_PATH_NOLOGIN, O_WRONLY|O_CREAT|O_TRUNC,
sbin/slattach/slattach.c
127
if ((fd = open(dev, O_RDWR | O_NDELAY)) < 0)
sbin/ttyflags/ttyflags.c
217
if ((fd = open(path, O_RDWR | O_NONBLOCK, 0)) == -1) {
sbin/tunefs/tunefs.c
236
fi = open(special, openflags);
sbin/veriexecctl/veriexecctl.c
231
if ((gfd = open(VERIEXEC_DEVICE, O_RDWR, 0)) == -1)
sbin/veriexecctl/veriexecctl.c
247
lfd = open(file, O_RDONLY|O_EXLOCK, 0);
sbin/wdogctl/wdogctl.c
195
fd = open(_PATH_WATCHDOG, O_RDWR, 0644);
sbin/wdogctl/wdogctl.c
213
fd = open(_PATH_WATCHDOG, O_RDWR, 0644);
sbin/wdogctl/wdogctl.c
239
fd = open(_PATH_WATCHDOG, O_RDWR, 0644);
sbin/wdogctl/wdogctl.c
316
fd = open(_PATH_WATCHDOG, O_RDWR, 0644);
sbin/wdogctl/wdogctl.c
332
fd = open(_PATH_WATCHDOG, O_RDWR, 0644);
sbin/wdogctl/wdogctl.c
372
fd = open(_PATH_WATCHDOG, O_RDONLY, 0644);
sbin/wsconsctl/wsconsctl.c
163
fd = open(file, O_WRONLY);
sbin/wsconsctl/wsconsctl.c
165
fd = open(file, O_RDONLY);
share/examples/pud/intro/doioctl.c
21
fd = open(argv[1], O_RDWR);
share/examples/pud/intro/intro.c
57
fd = open(argv[1], O_RDWR);
share/examples/puffs/pgfs/mount.c
186
fd = open(path, O_RDONLY | O_DIRECTORY);
share/examples/refuse/dbfs/dbfs.c
177
.open = dbfs_open,
share/examples/refuse/dmesgfs/dmesgfs.c
177
.open = dmesgfs_open,
share/examples/refuse/fanoutfs/fanoutfs.c
169
if ((fdfrom = open(from, O_RDONLY, 0666)) < 0) {
share/examples/refuse/fanoutfs/fanoutfs.c
174
if ((fdto = open(to, O_WRONLY | O_CREAT | O_EXCL, st.st_mode & 07777)) < 0) {
share/examples/refuse/fanoutfs/fanoutfs.c
290
if ((fd = open(name, O_RDONLY, 0666)) < 0) {
share/examples/refuse/fanoutfs/fanoutfs.c
319
if ((fd = open(name, O_WRONLY, 0666)) < 0) {
share/examples/refuse/fanoutfs/fanoutfs.c
436
if ((fd = open(name, O_RDWR | O_CREAT | O_EXCL, 0666)) < 0) {
share/examples/refuse/fanoutfs/fanoutfs.c
582
.open = fanoutfs_open,
share/examples/refuse/ian/ian/ian.c
202
if ((fd = open(ep->tgt, O_RDONLY, 0666)) < 0) {
share/examples/refuse/ian/ian/ian.c
246
.open = ian_open,
share/examples/refuse/icfs/icfs.c
171
if ((fd = open(name, O_RDONLY, 0666)) < 0) {
share/examples/refuse/icfs/icfs.c
202
if ((fd = open(name, O_WRONLY, 0666)) < 0) {
share/examples/refuse/icfs/icfs.c
337
if ((fd = open(name, O_RDWR | O_CREAT | O_EXCL, 0666)) < 0) {
share/examples/refuse/icfs/icfs.c
517
.open = icfs_open,
share/examples/refuse/id3fs/id3fs.c
147
.open = id3fs_open,
share/examples/refuse/pcifs/pcifs.c
143
.open = pcifs_open,
share/examples/rump/sdread/sdread.c
173
fd_h = open(argv[2], O_RDWR | O_CREAT, 0777);
share/examples/rump/ttyserv/ttyserv.c
172
fd = open(_PATH_PUD, O_RDWR);
share/examples/rump/ulptprint/ulptprint.c
73
fd_src = open(argv[1], O_RDONLY);
share/examples/rump/umserv/umserv.c
106
fd = open(_PATH_PUD, O_RDWR);
share/man/tools/noso.c
21
fd = open(argv[i], O_RDONLY);
sys/altq/altq_conf.h
89
dev_decl(n,open); dev_decl(n,close); dev_decl(n,ioctl)
sys/arch/alpha/stand/common/bootxx.c
101
fd = open("boot", 0);
sys/arch/alpha/stand/mkbootimage/mkbootimage.c
103
if ((infd = open(infile, O_RDONLY)) == -1)
sys/arch/alpha/stand/mkbootimage/mkbootimage.c
155
} else if ((outfd = open(outfile, O_WRONLY|O_CREAT, 0666)) == -1)
sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
169
if ((fd = open(netboot, O_RDONLY, 0)) == -1)
sys/arch/alpha/stand/setnetbootinfo/setnetbootinfo.c
232
if ((fd = open(outfilename, O_WRONLY | O_CREAT, 0666)) == -1)
sys/arch/amiga/dev/aucc.c
173
.open = aucc_open,
sys/arch/amiga/dev/toccata.c
186
.open = toccata_open,
sys/arch/amiga/dev/zz9k_ax.c
122
.open = zzax_open,
sys/arch/amiga/stand/binpatch/binpatch.c
191
if ((fd = open(fname, 0)) < 0) {
sys/arch/amiga/stand/binpatch/binpatch.c
254
if ((fd = open(fname, 2)) == -1) {
sys/arch/amiga/stand/bootblock/bootxx_ffs/main.c
90
io = open("/boot.amiga", 0); /* Try /boot.amiga first */
sys/arch/amiga/stand/bootblock/bootxx_ffs/main.c
92
io = open("/boot", 0); /* Fallback to /boot */
sys/arch/amiga/stand/bootblock/bootxx_ffs/main.c
94
io = open("/boot.ami", 0); /* 8.3 name? */
sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
139
ifd = open(argv[0], O_RDONLY, 0);
sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
460
ofd = open(argv[1], O_CREAT|O_WRONLY, 0644);
sys/arch/amiga/stand/dumpfont/dumpfont.c
64
int bin = open ("bitmap", 1);
sys/arch/amiga/stand/loadkmap/loadkmap.c
41
if ((fd = open (file, 0)) >= 0)
sys/arch/arc/arc/arcbios.h
280
arc_status_t (*open)( /* Open 24 */
sys/arch/arm/broadcom/bcm2835_vcaudioreg.h
149
VC_AUDIO_OPEN_T open;
sys/arch/arm/imx/imx23_digfilt.c
124
.open = NULL,
sys/arch/arm/nvidia/tegra_cec.c
96
.open = tegra_cec_open,
sys/arch/arm/xscale/pxa2x0_ac97.c
151
.open = acu_open,
sys/arch/atari/stand/ahdilabel/openraw.c
47
if ((f = open (name, flags)) != -1)
sys/arch/atari/stand/ahdilabel/openraw.c
51
if ((f = open (buf, flags)) != -1)
sys/arch/atari/stand/ahdilabel/openraw.c
55
if ((f = open (buf, flags)) != -1)
sys/arch/atari/stand/binpatch/binpatch.c
198
if ((fd = open(fname, replace ? O_RDWR : O_RDONLY, 0)) == -1)
sys/arch/atari/stand/bootpref/bootpref.c
309
if ((fd = open (nvrdev, O_RDWR)) < 0) {
sys/arch/atari/stand/bootxx/bootxx.c
189
if ((fd = open(fname, 0)) < 0)
sys/arch/atari/stand/bootxxx/bootxxx.c
72
if ((fd = open(od->osname, 0)) < 0) {
sys/arch/atari/stand/edahdi/edahdi.c
126
if ((fd = open(argv[1], O_RDWR)) < 0)
sys/arch/atari/stand/installboot/disklabel.c
83
if ((fd = open(fn, O_RDONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
145
fd = open(dn, O_RDONLY);
sys/arch/atari/stand/installboot/installboot.c
148
fd = open(dn, O_RDONLY);
sys/arch/atari/stand/installboot/installboot.c
152
fd = open(dn, O_RDONLY);
sys/arch/atari/stand/installboot/installboot.c
267
if ((fd = open(devnm, O_WRONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
338
if ((fd = open(devnm, O_WRONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
371
if ((fd = open(xxb00t, O_RDONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
382
if ((fd = open(devnm, O_RDONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
423
if ((fd = open(bxx, O_RDONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
432
if ((fd = open(xxb, O_RDONLY)) < 0)
sys/arch/atari/stand/installboot/installboot.c
504
if ((fd = open(nvrdev, O_RDWR)) < 0)
sys/arch/atari/stand/loadkmap/loadkmap.c
53
if ((fd = open(file, 0)) >= 0) {
sys/arch/atari/stand/msconfig/msconfig.c
70
if ((fd = open(mousedev,O_RDONLY | O_NONBLOCK)) < 0) {
sys/arch/atari/stand/tostools/file2swp/file2swp.c
120
if ((fd = open(Infile, O_RDONLY)) < 0) {
sys/arch/atari/stand/tostools/libtos/cread.c
231
if ( ((fd = open(fname, mode)) == -1) || (mode != O_RDONLY) )
sys/arch/atari/stand/tostools/loadbsd/loadbsd.c
155
if ((fd = open(kname, O_RDONLY)) < 0)
sys/arch/atari/stand/tostools/rawwrite/rawwrite.c
104
if ((fd = open(infile, O_RDONLY)) < 0)
sys/arch/emips/ebus/ac97_ebus.c
46
#define stubopen __CONCAT(acns,open)
sys/arch/emips/ebus/evga_ebus.c
46
#define stubopen __CONCAT(evga,open)
sys/arch/emips/ebus/lcd_ebus.c
46
#define stubopen __CONCAT(lcd,open)
sys/arch/emips/ebus/ps2_ebus.c
46
#define stubopen __CONCAT(pstwo,open)
sys/arch/emips/stand/common/bootxx.c
141
if ((fd = open(bootfname, 0)) < 0) {
sys/arch/evbarm/mini2440/audio_mini2440.c
90
.open = uda_ssio_open,
sys/arch/evbarm/stand/boot2440/main.c
208
fd = open(bootfile, 0);
sys/arch/evbmips/stand/sbmips/common/bootxx.c
98
fd = open("boot", 0);
sys/arch/evbsh3/stand/mesboot/src/mesboot.c
63
fd = open(kernel, OptRead);
sys/arch/ews4800mips/stand/common/coffhdrfix.c
118
if ((fdout = open(argp[2], O_CREAT | O_TRUNC | O_RDWR, 0644)) < 0) {
sys/arch/ews4800mips/stand/common/coffhdrfix.c
122
fd = open(argp[1], O_RDWR);
sys/arch/ews4800mips/stand/common/coffhdrfix.c
92
if ((fd = open(argp[1], O_RDWR)) < 0) {
sys/arch/hp300/stand/inst/inst.c
533
if ((*fdp = open(fulldiskname, 1)) < 0) {
sys/arch/hp300/stand/inst/inst.c
584
if ((sfd = open(minirootname, 0)) < 0) {
sys/arch/hp300/stand/inst/inst.c
651
if ((sfd = open(minirootname, 0)) < 0) {
sys/arch/hp300/stand/mkboot/mkboot.c
152
if ((to = open(argv[0], O_WRONLY | O_TRUNC | O_CREAT, 0644)) == -1)
sys/arch/hp300/stand/mkboot/mkboot.c
235
if ((fd = open(from, 0)) < 0)
sys/arch/hpc/stand/hpcboot/file.h
53
virtual BOOL open(const TCHAR *, uint32_t = OPEN_EXISTING) = 0;
sys/arch/hpc/stand/hpcboot/file.h
99
BOOL open(const TCHAR *, uint32_t);
sys/arch/hpc/stand/hpcboot/file_fat.h
48
BOOL open(const TCHAR *, uint32_t);
sys/arch/hpc/stand/hpcboot/file_http.h
97
BOOL open(const TCHAR *, uint32_t);
sys/arch/hpc/stand/hpcboot/file_manager.cpp
69
if (!_file->open(name, flags))
sys/arch/hpc/stand/hpcboot/file_ufs.h
49
BOOL open(const TCHAR *, uint32_t);
sys/arch/hpc/stand/hpcboot/hpcboot.cpp
147
if (!f._file->open(f.args.mfsName)) {
sys/arch/hpc/stand/hpcboot/hpcboot.cpp
158
if (!f._file->open(f.args.fileName)) {
sys/arch/hpc/stand/hpcboot/hpcboot.cpp
201
if (!f._file->open(f.args.mfsName)) {
sys/arch/hpcmips/stand/lcboot/conf.c
59
.open = tftp_open,
sys/arch/hpcmips/stand/pbsdboot/pbsdboot.c
52
if (CheckCancel(0) || (fd = open((char*)wkernel_name, O_RDONLY)) < 0) {
sys/arch/hppa/stand/mkboot/mkboot.c
166
if ((to = open(to_file, O_RDWR | O_TRUNC | O_CREAT, 0644)) < 0)
sys/arch/hppa/stand/mkboot/mkboot.c
245
if ((from = open(from_file, O_RDONLY)) < 0)
sys/arch/hppa/stand/xxboot/readufs.c
331
if ((fd = open(argv[1], O_RDONLY)) < 0)
sys/arch/i386/stand/bootxx/boot1.c
64
return open("boot", 0);
sys/arch/i386/stand/lib/exec.c
614
fd = open(path, mode);
sys/arch/i386/stand/lib/exec.c
620
fd = open(bm->bm_path, mode);
sys/arch/i386/stand/lib/exec_multiboot1.c
228
if ((fd = open(path, 0)) == -1)
sys/arch/i386/stand/lib/exec_multiboot2.c
1489
if ((fd = open(path, 0)) == -1)
sys/arch/i386/stand/lib/test/biosdisk_user.c
72
fd = open(emuldisktab[i].name, O_RDONLY, 0);
sys/arch/i386/stand/lib/test/stand_user.c
107
memfd = open("/dev/mem", O_RDWR, 0);
sys/arch/i386/stand/misc/rawrite.c
135
if ((fdin = open(fname, O_RDONLY)) <= 0) {
sys/arch/ia64/stand/common/boot.c
299
if ((fd = open(lbuf, O_RDONLY)) < 0)
sys/arch/ia64/stand/common/commands.c
153
if ((hfd = open(buf, O_RDONLY)) < 0) {
sys/arch/ia64/stand/common/interp.c
211
if (((fd = open(filename, O_RDONLY)) == -1)) {
sys/arch/ia64/stand/common/ls.c
164
fd = open(path, O_RDONLY);
sys/arch/ia64/stand/common/pager.c
141
if ((fd = open(fname, O_RDONLY)) == -1) {
sys/arch/ia64/stand/efi/libefi/efifs_ls.c
138
if ((fd = open(path, 0)) < 0
sys/arch/ia64/stand/efi/libefi/efifs_ls.c
153
fd = open(p, 0);
sys/arch/ia64/stand/efi/libefi/efifs_ls.c
156
fd = open("", 0);
sys/arch/landisk/stand/bootxx/boot1.c
101
fd = open("boot", 0);
sys/arch/landisk/stand/bootxx/boot1.c
71
fd = open("boot", 0);
sys/arch/landisk/stand/bootxx/boot1.c
82
fd = open("boot", 0);
sys/arch/luna68k/dev/psgpam.c
158
.open = psgpam_open,
sys/arch/macppc/stand/fixcoff/fixcoff.c
146
if ((fd = open(argv[0], O_RDWR, 0)) == -1)
sys/arch/macppc/stand/installboot/installboot.c
115
if ((params->s1fd = open(params->stage1, O_RDONLY, 0600)) == -1)
sys/arch/macppc/stand/installboot/installboot.c
82
if ((params->fsfd = open(params->filesystem, O_RDWR, 0600)) == -1)
sys/arch/macppc/stand/mkboothfs/mkboothfs.c
84
if ((ofd = open(boothfs, O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1)
sys/arch/mipsco/stand/common/bootxx.c
131
if ((fd = open(bootfname, 0)) < 0) {
sys/arch/mipsco/stand/installboot/installboot.c
173
if ((fd = open(bootstrap, O_RDONLY)) == -1)
sys/arch/mipsco/stand/installboot/installboot.c
220
if ((fd = open(disk, O_WRONLY)) == -1)
sys/arch/mipsco/stand/installboot/installboot.c
240
if ((vfd = open(disk, O_RDONLY)) == -1)
sys/arch/mipsco/stand/installboot/installboot.c
271
if ((vfd = open(disk, O_WRONLY)) == -1)
sys/arch/mvme68k/stand/installboot/installboot.c
144
if ((devfd = open(dev, O_RDONLY, 0)) < 0)
sys/arch/mvme68k/stand/installboot/installboot.c
163
if ((devfd = open(dev, O_RDWR, 0)) < 0)
sys/arch/mvme68k/stand/installboot/installboot.c
257
if ((fd = open(boot, O_RDONLY)) < 0)
sys/arch/mvme68k/stand/wrtvid/wrtvid.c
168
if ((fd = open(fn, O_WRONLY | O_CREAT | O_TRUNC, 0644)) < 0) {
sys/arch/pmax/stand/common/bootxx.c
163
if ((fd = open(bootfname, 0)) < 0) {
sys/arch/pmax/stand/smallnet/setnetimage/setnetimage.c
102
if ((ofd = open(bootfile, O_RDWR)) < 0)
sys/arch/pmax/stand/smallnet/setnetimage/setnetimage.c
99
if ((ifd = open(kernel, O_RDONLY)) < 0)
sys/arch/powerpc/mpc5200/mpc5200_ac97.c
150
.open = mpcac97_open,
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c
143
if ((fd = open(file, 0)) < 0)
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c
193
raw_fd = open(rawdev, O_RDONLY, 0);
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c
323
if ((prep_fd = open(outname, O_RDWR|O_TRUNC, 0)) < 0) {
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c
491
if ((rs6000_fd = open(outname, O_RDWR|O_TRUNC, 0)) < 0) {
sys/arch/powerpc/stand/mkbootimage/mkbootimage.c
719
if ((bebox_fd = open(outname, O_RDWR|O_TRUNC, 0)) < 0) {
sys/arch/prep/isa/paud_isa.c
97
.open = ad1848_isa_open,
sys/arch/prep/stand/installboot/installboot.c
257
if ((devfd = open(dev, O_RDONLY, 0)) < 0) {
sys/arch/prep/stand/installboot/installboot.c
279
if ((devfd = open(dev, O_RDWR, 0)) < 0) {
sys/arch/prep/stand/installboot/installboot.c
85
if ((fd = open(boot, O_RDONLY)) < 0) {
sys/arch/sandpoint/stand/altboot/main.c
325
if ((fd = open(bname, 0)) < 0) {
sys/arch/sandpoint/stand/altboot/main.c
595
fd = open(path, 0);
sys/arch/sbmips/stand/common/bootxx.c
98
fd = open("boot", 0);
sys/arch/sgimips/hpc/haud.c
65
.open = haud_open,
sys/arch/sgimips/stand/sgivol/sgivol.c
201
fd = open(argv[0],
sys/arch/sgimips/stand/sgivol/sgivol.c
207
fd = open(buf, (opt_i | opt_w | opt_d | opt_p)
sys/arch/sgimips/stand/undist/undist.c
780
fd = open(file, flags, filemode);
sys/arch/sgimips/stand/undist/undist.c
787
fd = open(file, flags, filemode);
sys/arch/sgimips/stand/undist/undist.c
814
fd = open(file, flags, filemode);
sys/arch/shark/shark/scr.c
453
int open;
sys/arch/shark/shark/scr.c
769
sc->open = false;
sys/arch/shark/shark/scr.c
877
if (sc->open)
sys/arch/shark/shark/scr.c
886
sc->open = true;
sys/arch/shark/shark/scr.c
943
if (sc->open)
sys/arch/shark/shark/scr.c
948
sc->open = false;
sys/arch/sparc/stand/boot/boot.c
176
if ((fd = open(kernel, 0)) < 0)
sys/arch/usermode/usermode/thunk.c
504
return open(path, flags, mode);
sys/arch/usermode/usermode/thunk.c
788
fd = open("/proc/cpuinfo", O_RDONLY);
sys/arch/usermode/usermode/thunk.c
840
fd = open(device, O_RDWR);
sys/arch/usermode/usermode/thunk.c
905
return open(path, O_RDWR);
sys/arch/vax/boot/boot/boot.c
287
i = open(pcs, 0);
sys/arch/vax/boot/boot/vaxstand.h
33
#define SADEV(name,strategy,open,close,ioctl) \
sys/arch/vax/boot/boot/vaxstand.h
36
(int(*)(struct open_file *, ...))open, \
sys/arch/vax/boot/xxboot/bootxx.c
131
io = open("/boot.vax", 0);
sys/arch/vax/boot/xxboot/bootxx.c
133
io = open("/boot", 0);
sys/arch/x68k/stand/boot_ufs/readufs.c
335
if ((fd = open(argv[1], O_RDONLY)) < 0)
sys/arch/x68k/stand/installboot/installboot.c
119
fd = open(rawname, O_RDONLY | O_EXLOCK);
sys/arch/x68k/stand/installboot/installboot.c
216
fd = open(bootprog, O_RDONLY);
sys/arch/x68k/stand/installboot/installboot.c
235
fd = open(target, O_WRONLY);
sys/arch/x68k/stand/newdisk/newdisk.c
147
fd = open(mboot, O_RDONLY);
sys/arch/x68k/stand/newdisk/newdisk.c
185
fd = open(dev, O_WRONLY);
sys/arch/x68k/usr.bin/bellctrl/bellctrl.c
201
if ((fd = open(path, 0)) >= 0) {
sys/arch/x68k/usr.bin/bellctrl/bellctrl.c
210
if ((fd = open("/dev/bell", O_RDWR)) < 0)
sys/arch/x68k/usr.bin/bellctrl/bellctrl.c
224
if ((fd = open("/dev/bell", O_RDWR)) < 0)
sys/arch/x68k/usr.bin/loadfont/loadfont.c
41
if ((fd = open(file, O_RDONLY)) >= 0) {
sys/arch/x68k/usr.bin/loadkmap/loadkmap.c
41
if ((fd = open(file, 0)) >= 0) {
sys/arch/x68k/usr.bin/palette/palette.c
41
if ((fd = open("/dev/grf0", O_RDWR, 0)) < 0) {
sys/arch/zaurus/dev/wm8731_zaudio.c
111
.open = zaudio_open,
sys/arch/zaurus/dev/wm8750_zaudio.c
131
.open = zaudio_open,
sys/arch/zaurus/stand/zboot/loadfile_zboot.c
50
if ((fd = open(fname, 0)) < 0) {
sys/arch/zaurus/stand/zbsdmod/compat_linux.h
45
int (*open) (struct inode *, struct file *);
sys/compat/netbsd32/netbsd32.h
1205
} open;
sys/compat/netbsd32/netbsd32_execve.c
102
*pathp32 = NETBSD32PTR64(fae32->fae_data.open.path);
sys/compat/sunos/sunos.h
143
u_char open;
sys/dev/audio/audio.c
2446
if (sc->hw_if->open) {
sys/dev/audio/audio.c
2473
error = sc->hw_if->open(sc->hw_hdl, hwflags);
sys/dev/audio/audio.c
7853
pi->open = 1;
sys/dev/audio/audio.c
7864
ri->open = 1;
sys/dev/audio/audio_dai.h
127
if (!dai->dai_hw_if->open)
sys/dev/audio/audio_dai.h
129
return dai->dai_hw_if->open(dai->dai_priv, flags);
sys/dev/audio/audio_if.h
80
int (*open)(void *, int); /* open hardware */
sys/dev/bluetooth/btsco.c
170
.open = btsco_open,
sys/dev/dtv/dtvif.h
57
int (*open)(void *, int);
sys/dev/dtv/dtvvar.h
130
((sc)->sc_hw->open((sc)->sc_priv, (flags)))
sys/dev/ebus/cs4231_ebus.c
99
.open = cs4231_open,
sys/dev/fdt/ausoc.c
324
.open = ausoc_open,
sys/dev/fdt/simple_amplifier.c
92
.open = simple_amplifier_open,
sys/dev/hdmicec/hdmicec.c
116
if (sc->sc_hwif->open != NULL) {
sys/dev/hdmicec/hdmicec.c
117
error = sc->sc_hwif->open(sc->sc_priv, flag);
sys/dev/hdmicec/hdmicec_if.h
35
int (*open)(void *, int);
sys/dev/ic/arcofi.c
223
.open = arcofi_open,
sys/dev/ic/mpu.c
102
sc->open = 0;
sys/dev/ic/mpu.c
170
if (sc->open)
sys/dev/ic/mpu.c
185
sc->open = 1;
sys/dev/ic/mpu.c
200
sc->open = 0;
sys/dev/ic/mpuvar.h
38
int open;
sys/dev/ic/opl.c
130
.open = oplsyn_open,
sys/dev/isa/aria.c
216
.open = ariaopen,
sys/dev/isa/cms.c
82
.open = cms_open,
sys/dev/isa/gus.c
579
.open = gusopen,
sys/dev/isa/gus.c
602
.open = gusmaxopen,
sys/dev/isa/pas.c
126
.open = sbdsp_open,
sys/dev/isa/sb.c
83
.open = sbdsp_open,
sys/dev/isa/wss.c
88
.open = ad1848_isa_open,
sys/dev/isa/ym.c
171
.open = ad1848_isa_open,
sys/dev/isapnp/gus_isapnp.c
65
.open = gus_isapnp_open,
sys/dev/microcode/cyclades-z/cyzfirm2h.c
73
i = open(argv[1], O_RDONLY, 0644);
sys/dev/microcode/ral/build.c
38
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/rum/build.c
38
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/run/build.c
38
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/microcode/zyd/build.c
37
fd = open(name, O_WRONLY | O_CREAT | O_TRUNC, 0644);
sys/dev/midi.c
166
hwp->open == 0 ||
sys/dev/midi.c
862
error = hw->open(sc->hw_hdl, flags, midi_in, midi_out, sc);
sys/dev/midi_if.h
64
int (*open)(void *, int, /* open hardware */
sys/dev/midisyn.c
152
if (ms->mets->open)
sys/dev/midisyn.c
153
rslt = (ms->mets->open(ms, flags));
sys/dev/midisynvar.h
52
int (*open) (midisyn *, int /* flags */);
sys/dev/pci/auich.c
302
.open = auich_open,
sys/dev/pci/autri.c
134
.open = autri_open,
sys/dev/pci/auvia.c
209
.open = auvia_open,
sys/dev/pci/coram.c
129
.open = coram_dtv_open,
sys/dev/pci/cxdtv.c
118
.open = cxdtv_dtv_open,
sys/dev/pci/cxgb/cxgb_toedev.h
98
int (*open)(struct toedev *dev);
sys/dev/pci/eap.c
161
.open = eap_open,
sys/dev/pci/eap.c
179
.open = eap_open,
sys/dev/pci/gcscaudio.c
182
.open = gcscaudio_open,
sys/dev/pci/if_iwn.c
4500
btprot.open = 1;
sys/dev/pci/if_iwn.c
4508
btprot.open = 0;
sys/dev/pci/if_iwnreg.h
989
uint8_t open;
sys/dev/pci/sv.c
167
.open = sv_open,
sys/dev/pci/xmm7360.c
1085
.open = xmm7360_cdev_open,
sys/dev/pci/xmm7360.c
1568
if (qp->open)
sys/dev/pci/xmm7360.c
1572
if (qp->open && qp->port.ops) {
sys/dev/pci/xmm7360.c
1707
.open = xmm7360_tty_open,
sys/dev/pci/xmm7360.c
2091
if (xmm->net && xmm->net->qp->open && xmm7360_qp_has_data(xmm->net->qp))
sys/dev/pci/xmm7360.c
2096
if (!qp->open)
sys/dev/pci/xmm7360.c
2302
if (qp->open)
sys/dev/pci/xmm7360.c
2323
if (qp->open)
sys/dev/pci/xmm7360.c
2772
if (!qp->open) {
sys/dev/pci/xmm7360.c
2803
if (qp->open) {
sys/dev/pci/xmm7360.c
488
int open;
sys/dev/pci/xmm7360.c
825
qp->open = 0;
sys/dev/pci/xmm7360.c
847
if (qp->open) {
sys/dev/pci/xmm7360.c
851
qp->open = 1;
sys/dev/pci/xmm7360.c
868
BUG_ON(!qp->open);
sys/dev/pci/xmm7360.c
880
if (!qp->open) {
sys/dev/pci/xmm7360.c
893
qp->open = 0;
sys/dev/pci/xmm7360.c
904
BUG_ON(!qp->open);
sys/dev/pci/yds.c
203
.open = yds_open,
sys/dev/radio.c
114
if (sc->hw_if->open != NULL)
sys/dev/radio.c
115
return (sc->hw_if->open(sc->hw_hdl, flags, fmt, l->l_proc));
sys/dev/radio_if.h
41
int (*open)(void *, int, int, struct proc *);
sys/dev/sbus/cs4231_sbus.c
100
.open = cs4231_open,
sys/dev/sbus/dbri.c
178
.open = dbri_open,
sys/dev/sun/kbd.c
211
if (k->k_ops != NULL && k->k_ops->open != NULL)
sys/dev/sun/kbd.c
212
if ((error = (*k->k_ops->open)(k)) != 0) {
sys/dev/sun/kbd.c
547
if (k->k_ops != NULL && k->k_ops->open != NULL)
sys/dev/sun/kbd.c
548
ret = (*k->k_ops->open)(k);
sys/dev/sun/kbd.c
976
if (k->k_ops != NULL && k->k_ops->open != NULL)
sys/dev/sun/kbd.c
977
(*k->k_ops->open)(k);
sys/dev/sun/kbdvar.h
95
int (*open)(struct kbd_softc *);
sys/dev/usb/auvitek_dtv.c
79
.open = auvitek_dtv_open,
sys/dev/usb/auvitek_video.c
104
.open = auvitek_open,
sys/dev/usb/emdtv_dtv.c
73
.open = emdtv_dtv_open,
sys/dev/usb/pseye.c
147
.open = pseye_open,
sys/dev/usb/uaudio.c
407
.open = uaudio_open,
sys/dev/usb/ucom.c
1590
XXX what if the hardware is not open
sys/dev/usb/umidi.c
291
.open = umidi_open,
sys/dev/usb/usbdi.c
286
SDT_PROBE5(usb, device, pipe, open,
sys/dev/usb/usbdi.c
67
SDT_PROBE_DEFINE5(usb, device, pipe, open,
sys/dev/usb/uvideo.c
379
.open = uvideo_open,
sys/dev/video.c
1749
if (hw->open != NULL) {
sys/dev/video.c
1750
err = hw->open(sc->hw_softc, flags);
sys/dev/video_if.h
459
int (*open)(void *, int); /* open hardware */
sys/dist/pf/net/pf_ioctl.c
1043
if (rs == NULL || !rs->rules[rs_num].inactive.open ||
sys/dist/pf/net/pf_ioctl.c
1082
rs->rules[rs_num].inactive.open = 0;
sys/dist/pf/net/pf_ioctl.c
3059
!rs->rules[ioe->rs_num].inactive.open ||
sys/dist/pf/net/pf_ioctl.c
924
rs->rules[rs_num].inactive.open = 1;
sys/dist/pf/net/pf_ioctl.c
937
if (rs == NULL || !rs->rules[rs_num].inactive.open ||
sys/dist/pf/net/pf_ioctl.c
944
rs->rules[rs_num].inactive.open = 0;
sys/dist/pf/net/pf_ruleset.c
294
ruleset->rules[i].inactive.open)
sys/dist/pf/net/pfvar.h
896
int open;
sys/fs/nfs/common/nfsrvstate.h
170
struct nfsstatehead open; /* Opens list */
sys/fs/nfs/common/nfsrvstate.h
195
#define ls_open ls_head.open
sys/fs/puffs/puffs_vnops.c
839
PUFFS_MSG_VARS(vn, open);
sys/fs/puffs/puffs_vnops.c
854
PUFFS_MSG_ALLOC(vn, open);
sys/fs/puffs/puffs_vnops.c
880
PUFFS_MSG_RELEASE(open);
sys/kern/subr_devsw.c
1195
SDT_PROBE6(sdt, bdev, open, acquire,
sys/kern/subr_devsw.c
1200
SDT_PROBE4(sdt, bdev, open, entry, d, dev, flag, devtype);
sys/kern/subr_devsw.c
1202
SDT_PROBE5(sdt, bdev, open, return, d, dev, flag, devtype, rv);
sys/kern/subr_devsw.c
1206
SDT_PROBE6(sdt, bdev, open, release,
sys/kern/subr_devsw.c
133
SDT_PROBE_DEFINE6(sdt, bdev, open, acquire,
sys/kern/subr_devsw.c
140
SDT_PROBE_DEFINE4(sdt, bdev, open, entry,
sys/kern/subr_devsw.c
1431
SDT_PROBE6(sdt, cdev, open, acquire,
sys/kern/subr_devsw.c
1436
SDT_PROBE4(sdt, cdev, open, entry, d, dev, flag, devtype);
sys/kern/subr_devsw.c
1438
SDT_PROBE5(sdt, cdev, open, return, d, dev, flag, devtype, rv);
sys/kern/subr_devsw.c
1442
SDT_PROBE6(sdt, cdev, open, release,
sys/kern/subr_devsw.c
145
SDT_PROBE_DEFINE5(sdt, bdev, open, return,
sys/kern/subr_devsw.c
151
SDT_PROBE_DEFINE6(sdt, bdev, open, release,
sys/kern/subr_devsw.c
229
SDT_PROBE_DEFINE6(sdt, cdev, open, acquire,
sys/kern/subr_devsw.c
236
SDT_PROBE_DEFINE4(sdt, cdev, open, entry,
sys/kern/subr_devsw.c
241
SDT_PROBE_DEFINE5(sdt, cdev, open, return,
sys/kern/subr_devsw.c
247
SDT_PROBE_DEFINE6(sdt, cdev, open, release,
sys/lib/libsa/bootcfg.c
119
fd = open(conf, 0);
sys/lib/libsa/getfile.c
48
} while ((fd = open(buf, mode)) < 0);
sys/lib/libsa/loadfile.c
100
if ((fd = open(fname, 0)) < 0) {
sys/lib/libsa/ls.c
102
if ((fd = open(path, 0)) < 0
sys/lib/libsa/ls.c
118
fd = open(p, 0);
sys/lib/libsa/ls.c
121
fd = open("", 0);
sys/lib/libsa/stand.h
112
__compactcall int (*open)(const char *, struct open_file *);
sys/lib/libsa/stand.h
145
#define FS_OPEN(fs) ((fs)->open)
sys/lib/libsa/stand.h
200
#define DEV_OPEN(d) ___CONCAT(LIBSA_SINGLE_DEVICE,open)
sys/lib/libsa/stand.h
268
int open(const char *, int);
sys/lib/libsa/stat.c
41
fd = open(str, 0);
sys/modules/examples/fopsmapper/cmd_mapper.c
47
if ((devfd = open(_PATH_DEV_MAPPER, O_RDONLY)) == -1)
sys/modules/examples/mapper/cmd_mapper.c
47
if ((devfd = open(_PATH_DEV_MAPPER, O_RDONLY)) == -1)
sys/modules/examples/ping/cmd_ping.c
49
if ((devfd = open(_PATH_DEV_PING, O_RDWR)) == -1)
sys/modules/examples/ping_block/cmd_ping.c
49
if ((devfd = open(_PATH_DEV_PING, O_RDWR)) == -1)
sys/modules/examples/pollpal/cmd_pollpal.c
83
fd = open(dev, O_RDWR, 0);
sys/modules/lua/lua.c
403
m->open,
sys/modules/lua/lua.c
547
luaL_requiref(L, md->mod_name, md->open, 0);
sys/modules/lua/lua.c
638
klua_mod_register(const char *name, lua_CFunction open)
sys/modules/lua/lua.c
647
m->open = open;
sys/modules/lua/luavar.h
38
lua_CFunction open;
sys/rump/librump/rumpkern/rump_syscalls.c
153
__weak_alias(open,rump___sysimpl_open);
sys/rump/net/lib/libvirtif/virtif_user.c
85
fd = open(tapdev, O_RDWR);
sys/rump/net/lib/libvirtif/virtif_user.c
95
fd = open("/dev/net/tun", O_RDWR);
sys/rump/net/lib/libwg/wg_user.c
93
fd = open(tun_path, O_RDWR);
sys/stand/efiboot/exec.c
63
fd = open(path, 0);
sys/sys/audioio.h
69
u_char open; /* non-zero if currently open */
sys/sys/fcntl.h
342
int open(const char *, int, ...);
sys/sys/midiio.h
626
fd = open("/dev/music", O_RDWR);
sys/sys/spawn.h
58
#define fae_path fae_data.open.path
sys/sys/spawn.h
60
#define fae_oflag fae_data.open.oflag
sys/sys/spawn.h
62
#define fae_mode fae_data.open.mode
sys/sys/spawn.h
63
} open;
tests/compat/linux/h_inotify_directory.c
76
RS(targetfd = open("test/test", LINUX_O_RDWR|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_single_file.c
51
RS(targetfd = open("test", LINUX_O_RDWR|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_single_file.c
59
RS(targetfd = open("test", LINUX_O_RDWR|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_single_file.c
63
RS(targetfd = open("test", LINUX_O_RDONLY|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_watch_change.c
47
RS(targetfd = open("test", LINUX_O_RDWR|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_watch_change.c
55
RS(targetfd = open("test", LINUX_O_RDONLY|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_watch_change.c
67
RS(targetfd = open("test", LINUX_O_RDONLY|LINUX_O_CREAT, 0644));
tests/compat/linux/h_inotify_watch_change.c
79
RS(targetfd = open("test", LINUX_O_RDONLY|LINUX_O_CREAT, 0644));
tests/crypto/opencrypto/h_aescbc.c
130
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_aesctr1.c
216
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_aesctr2.c
58
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_arc4.c
54
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_camellia.c
60
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_cbc3des.c
59
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_cbcdes.c
55
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_comp.c
50
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_comp_zlib.c
50
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_comp_zlib_rnd.c
55
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_gcm.c
61
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_ioctl.c
430
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_md5.c
79
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_md5hmac.c
147
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_null.c
50
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_sha1hmac.c
157
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_sha2hmac.c
236
fd = open("/dev/crypto", O_RDWR, 0);
tests/crypto/opencrypto/h_thread.c
179
if ((fd = open("/dev/crypto", O_RDWR, 0)) == -1)
tests/crypto/opencrypto/h_xcbcmac.c
81
fd = open("/dev/crypto", O_RDWR, 0);
tests/dev/audio/audiotest.c
1551
XP_EQ(exp_popen, ai.play.open);
tests/dev/audio/audiotest.c
1569
XP_EQ(exp_ropen, ai.record.open);
tests/dev/audio/audiotest.c
1639
XP_EQ(exp_popen, ai.play.open);
tests/dev/audio/audiotest.c
1657
XP_EQ(exp_ropen, ai.record.open);
tests/dev/audio/audiotest.c
414
r = open(filename, flag);
tests/dev/audio/audiotest.c
4568
XP_EQ(mode2play(openmode), ai.play.open);
tests/dev/audio/audiotest.c
4569
XP_EQ(mode2rec(openmode), ai.record.open);
tests/dev/audio/audiotest.c
4599
XP_EQ(mode2play(openmode), ai.play.open);
tests/dev/audio/audiotest.c
4600
XP_EQ(mode2rec(openmode), ai.record.open);
tests/dev/audio/audiotest.c
4667
XP_EQ(1, ai.play.open);
tests/dev/audio/audiotest.c
4668
XP_EQ(mode2rec(O_RDWR), ai.record.open);
tests/dev/audio/audiotest.c
4707
XP_EQ(1, ai.play.open);
tests/dev/audio/audiotest.c
4708
XP_EQ(mode2rec(O_RDWR), ai.record.open);
tests/dev/audio/audiotest.c
4845
XP_EQ(mode2play(openmode), ai.play.open);
tests/dev/audio/audiotest.c
4846
XP_EQ(mode2rec(openmode), ai.record.open);
tests/dev/audio/audiotest.c
4862
XP_EQ(mode2play(openmode), ai.play.open);
tests/dev/audio/audiotest.c
4863
XP_EQ(mode2rec(openmode), ai.record.open);
tests/dev/cgd/t_cgd_3des.c
700
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
tests/dev/cgd/t_cgd_adiantum.c
339
RL(dkfd = open(imgpath, O_CREAT|O_RDWR|O_TRUNC, 0600));
tests/dev/cgd/t_cgd_aes.c
3101
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
tests/dev/cgd/t_cgd_blowfish.c
1936
fd = open(imgpath, O_CREAT | O_RDWR | O_TRUNC, 0600);
tests/fs/common/fstest_zfs.c
68
if ((fd = open(image, O_RDWR | O_CREAT, 0777)) == -1)
tests/fs/fifofs/t_fifo.c
122
if ((fd = open(FIFO_FILE_PATH, O_WRONLY, 0)) == -1)
tests/fs/fifofs/t_fifo.c
140
if ((fd = open(FIFO_FILE_PATH, O_RDONLY, 0)) == -1) {
tests/fs/fifofs/t_fifo.c
45
fd = open(FIFO_FILE_PATH, O_WRONLY, 0);
tests/fs/psshfs/h_have_puffs.c
39
fd = open("/dev/puffs", O_RDWR);
tests/fs/tmpfs/h_tools.c
135
fd = open(argv[i], O_RDONLY);
tests/include/t_paths.c
141
fd = open(paths[i].path, O_RDONLY);
tests/kernel/h_fexecve.c
43
int fd = open(args[0], O_RDONLY);
tests/kernel/kqueue/read/t_fifo.c
127
ATF_REQUIRE((wfd = open(fifo_path, O_WRONLY | O_NONBLOCK)) >= 0);
tests/kernel/kqueue/read/t_fifo.c
84
ATF_REQUIRE((rfd = open(fifo_path, O_RDONLY | O_NONBLOCK)) >= 0);
tests/kernel/kqueue/read/t_fifo.c
85
ATF_REQUIRE((wfd = open(fifo_path, O_WRONLY | O_NONBLOCK)) >= 0);
tests/kernel/kqueue/read/t_file.c
66
fd = open(FILENAME, O_WRONLY|O_APPEND, 0644);
tests/kernel/kqueue/read/t_file.c
98
RL(fd = open(FILENAME, O_RDONLY|O_CREAT, 0644));
tests/kernel/kqueue/read/t_file2.c
59
RL(fd1 = open("afile", O_RDONLY|O_CREAT, 0644));
tests/kernel/kqueue/read/t_file2.c
60
RL(fd2 = open("bfile", O_RDONLY|O_CREAT, 0644));
tests/kernel/kqueue/t_vnode.c
38
target = open(dir_target, O_RDONLY, 0);
tests/kernel/kqueue/t_vnode.c
534
ATF_REQUIRE((fd = open(testfile,
tests/kernel/kqueue/t_vnode.c
548
ATF_REQUIRE((fd = open(testfile, O_RDWR)) != -1);
tests/kernel/kqueue/t_vnode.c
580
ATF_REQUIRE((fd = open(testfile, O_RDONLY)) != -1);
tests/kernel/kqueue/t_vnode.c
63
fd = open(file, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR);
tests/kernel/kqueue/t_vnode.c
632
ATF_REQUIRE((open_ev_fd = open(testfile,
tests/kernel/kqueue/t_vnode.c
655
ATF_REQUIRE((fd = open(testfile, O_RDWR)) != -1);
tests/kernel/kqueue/t_vnode.c
688
ATF_REQUIRE((dir_fd = open(dir_target, O_RDONLY)) != -1);
tests/kernel/kqueue/t_vnode.c
690
ATF_REQUIRE((file_fd = open(file_inside1, O_RDONLY | O_CREAT,
tests/kernel/kqueue/write/t_fifo.c
84
ATF_REQUIRE((rfd = open(fifo_path, O_RDONLY | O_NONBLOCK)) >= 0);
tests/kernel/kqueue/write/t_fifo.c
85
ATF_REQUIRE((wfd = open(fifo_path, O_WRONLY | O_NONBLOCK)) >= 0);
tests/kernel/t_cloexec.c
140
RL(fd = open("file", O_RDWR|O_CREAT|O_CLOEXEC, 0644));
tests/kernel/t_cloexec.c
150
RL(fd = open("file", O_RDWR|O_CREAT, 0644));
tests/kernel/t_cloexec.c
161
RL(fd = open("file", O_RDWR|O_CREAT, 0644));
tests/kernel/t_cloexec.c
98
RL(fd = open("/dev/drvctl", O_RDONLY|O_CLOEXEC));
tests/kernel/t_clofork.c
141
RL(fd = open("file", O_RDWR|O_CREAT|O_CLOFORK, 0644));
tests/kernel/t_clofork.c
151
RL(fd = open("file", O_RDWR|O_CREAT, 0644));
tests/kernel/t_clofork.c
99
RL(fd = open("/dev/drvctl", O_RDONLY|O_CLOFORK));
tests/kernel/t_fcntl.c
67
fd = open(files[i].name, O_RDONLY|O_NOFOLLOW);
tests/kernel/t_lockf.c
130
fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666);
tests/kernel/t_lockf.c
225
fd = open (lockfile, O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666);
tests/kernel/t_lockf.c
77
fd = open (lockfile, O_RDWR, 0);
tests/kernel/t_lua.c
121
RL(fd = open(path, O_WRONLY|O_CREAT));
tests/kernel/t_lua.c
128
RL(fd = open(_PATH_DEV_LUA, O_RDONLY));
tests/kernel/t_lua.c
140
RL(fd = open(_PATH_DEV_LUA, O_WRONLY));
tests/kernel/t_lua.c
207
if (open(_PATH_DEV_LUA, O_WRONLY) != -1) {
tests/kernel/t_open_pr_57260.c
86
fd = open("fifo", O_RDONLY);
tests/kernel/t_pty.c
158
if ((fd = open(ttydev, O_RDWR, 0)) == -1)
tests/kernel/t_sysv.c
109
output = open(path, O_WRONLY | O_CREAT | O_TRUNC, 0600);
tests/kernel/t_sysv.c
123
input = open(path, O_RDONLY);
tests/kernel/t_sysv.c
156
fd = open(token_key, O_RDWR | O_CREAT | O_EXCL, 0600);
tests/lib/libc/c063/t_faccessat.c
111
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_faccessat.c
128
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_faccessat.c
131
ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_faccessat.c
146
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_faccessat.c
164
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_faccessat.c
187
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_faccessat.c
209
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_faccessat.c
63
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_faccessat.c
66
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_faccessat.c
82
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchmodat.c
124
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchmodat.c
141
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchmodat.c
144
ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchmodat.c
159
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchmodat.c
178
ATF_REQUIRE((dfdlink = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchmodat.c
69
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchmodat.c
72
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchmodat.c
92
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchownat.c
113
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchownat.c
155
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchownat.c
176
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchownat.c
179
ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchownat.c
198
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchownat.c
221
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fchownat.c
85
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fchownat.c
88
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fexecve.c
64
if ((fd = open("/usr/bin/touch", O_RDONLY, 0)) == -1)
tests/lib/libc/c063/t_fstatat.c
119
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fstatat.c
137
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fstatat.c
140
ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fstatat.c
156
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fstatat.c
175
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fstatat.c
64
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_fstatat.c
67
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_fstatat.c
87
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_linkat.c
117
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_linkat.c
134
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_linkat.c
154
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_linkat.c
158
ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_linkat.c
159
ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_linkat.c
187
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_linkat.c
191
ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_linkat.c
192
ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_linkat.c
68
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_linkat.c
71
ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_linkat.c
72
ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_linkat.c
95
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_mkdirat.c
106
ATF_REQUIRE((fd = open(SDIR, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_mkdirat.c
61
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_mkfifoat.c
106
ATF_REQUIRE((fd = open(FIFO, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_mkfifoat.c
126
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_mkfifoat.c
61
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_mknodat.c
137
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_mknodat.c
79
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
112
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
115
ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
144
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
147
ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
177
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
180
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
206
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
209
ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
236
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
239
ATF_REQUIRE((dfd = open(DIR, O_RDONLY|O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
268
ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_SEARCH, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
286
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
290
ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
308
ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
326
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
329
ATF_REQUIRE((dfd = open(DIR, O_SEARCH, 0)) != -1);
tests/lib/libc/c063/t_o_search.c
82
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_o_search.c
85
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_openat.c
114
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_openat.c
131
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_openat.c
134
ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_openat.c
149
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_openat.c
61
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_openat.c
64
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_openat.c
81
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_readlinkat.c
125
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_readlinkat.c
141
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_readlinkat.c
65
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_readlinkat.c
69
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_readlinkat.c
91
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_renameat.c
118
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_renameat.c
135
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_renameat.c
66
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_renameat.c
71
ATF_REQUIRE((ofd = open(ODIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_renameat.c
72
ATF_REQUIRE((nfd = open(NDIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_renameat.c
95
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_symlinkat.c
114
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_symlinkat.c
135
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_symlinkat.c
66
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_symlinkat.c
69
ATF_REQUIRE((dfd = open(NDIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_symlinkat.c
91
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_unlinkat.c
109
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_unlinkat.c
126
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_unlinkat.c
129
ATF_REQUIRE((dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_unlinkat.c
144
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_unlinkat.c
61
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_unlinkat.c
64
ATF_REQUIRE((dfd = open(DIR, O_RDONLY, 0)) != -1);
tests/lib/libc/c063/t_unlinkat.c
80
ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1);
tests/lib/libc/c063/t_utimensat.c
100
RL(dfd = open(DIR, O_RDONLY, 0));
tests/lib/libc/c063/t_utimensat.c
122
RL(fd = open(FILE, O_CREAT|O_RDWR, 0644));
tests/lib/libc/c063/t_utimensat.c
156
RL(dfd = open(DIR, O_RDONLY, 0));
tests/lib/libc/c063/t_utimensat.c
174
RL(fd = open(FILE, O_CREAT|O_RDWR, 0644));
tests/lib/libc/c063/t_utimensat.c
177
RL(dfd = open(getcwd(cwd, MAXPATHLEN), O_RDONLY, 0));
tests/lib/libc/c063/t_utimensat.c
193
RL(fd = open(FILE, O_CREAT|O_RDWR, 0644));
tests/lib/libc/c063/t_utimensat.c
213
RL(dfd = open(DIR, O_RDONLY, 0));
tests/lib/libc/c063/t_utimensat.c
97
RL(fd = open(FILE, O_CREAT|O_RDWR, 0644));
tests/lib/libc/db/h_db.c
128
if ((ofd = open(optarg,
tests/lib/libc/db/h_db.c
718
if ((fd = open(name, O_RDONLY, 0)) == -1 || fstat(fd, &sb) == -1)
tests/lib/libc/gen/isqemu.h
53
int fd = open(DRVCTLDEV, O_RDONLY, 0);
tests/lib/libc/gen/posix_spawn/t_fileactions.c
287
RL(fd1 = open("/dev/null", O_RDONLY));
tests/lib/libc/gen/posix_spawn/t_fileactions.c
290
RL(fd2 = open("/dev/null", O_WRONLY, O_CLOEXEC));
tests/lib/libc/gen/posix_spawn/t_fileactions.c
293
RL(fd3 = open("/dev/null", O_WRONLY));
tests/lib/libc/gen/posix_spawn/t_fileactions.c
327
fd = open("/dev/null", O_RDONLY);
tests/lib/libc/gen/posix_spawn/t_fileactions.c
371
fd = open("/dev/null", O_RDONLY);
tests/lib/libc/gen/posix_spawn/t_spawn.c
179
RL(fd = open(file, O_RDONLY));
tests/lib/libc/gen/posix_spawn/t_spawn.c
225
RL(fd = open(dirpath, O_RDONLY));
tests/lib/libc/gen/posix_spawn/t_spawn.c
452
RL(fd = open(FILENAME, O_WRONLY | O_CREAT | O_TRUNC, 0644));
tests/lib/libc/gen/t_arc4random.c
314
if (open(_PATH_URANDOM, O_RDONLY) != -1)
tests/lib/libc/gen/t_arc4random.c
362
if (open(_PATH_URANDOM, O_RDONLY) != -1)
tests/lib/libc/gen/t_closefrom.c
56
fd = open(path, O_RDONLY | O_CREAT, 0400);
tests/lib/libc/gen/t_closefrom.c
97
buf[i] = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/gen/t_ftok.c
68
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/gen/t_realpath.c
131
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/gen/t_ttyname.c
114
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/gen/t_ttyname.c
53
fd = open("XXX", O_RDONLY);
tests/lib/libc/gen/t_ttyname.c
68
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/kevent_nullmnt/h_nullmnt.c
42
watch_file = open(argv[1], O_RDONLY);
tests/lib/libc/kevent_nullmnt/h_nullmnt.c
47
write_file = open(argv[2], O_WRONLY, O_APPEND);
tests/lib/libc/ssp/h_read.c
48
if ((fd = open(_PATH_DEVZERO, O_RDONLY)) == -1)
tests/lib/libc/stdio/t_fopen.c
133
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/stdio/t_fopen.c
65
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/stdio/t_fopen.c
92
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/stdlib/t_system.c
60
fd = open(path, O_RDONLY);
tests/lib/libc/sys/t_access.c
61
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_chroot.c
101
fd = open(buf, O_RDONLY);
tests/lib/libc/sys/t_chroot.c
191
fd = open(buf, O_RDONLY);
tests/lib/libc/sys/t_chroot.c
205
fd = open("file", O_RDONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_chroot.c
224
fd = open(buf, O_RDONLY);
tests/lib/libc/sys/t_chroot.c
244
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_chroot.c
274
fd = open(buf, O_RDONLY);
tests/lib/libc/sys/t_chroot.c
82
fd = open("file", O_RDONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_dup.c
114
fd1 = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_dup.c
115
fd2 = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_dup.c
142
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_dup.c
207
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_dup.c
319
buf[i] = open(path, O_RDONLY);
tests/lib/libc/sys/t_dup.c
69
fd1 = open(path, mode[i] | O_CREAT, perm[j]);
tests/lib/libc/sys/t_dup.c
70
fd2 = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_futex_ops.c
225
RL(bs_fd = open(bs_path, O_RDWR | O_CREAT | O_EXCL, 0644));
tests/lib/libc/sys/t_getrusage.c
140
fd = open(DUMP_FILE, O_WRONLY|O_CREAT|O_TRUNC, 0222);
tests/lib/libc/sys/t_kevent.c
155
fd = open(DRVCTLDEV, O_RDONLY);
tests/lib/libc/sys/t_link.c
117
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_link.c
192
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_link.c
80
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_listen.c
68
fdc = open("listen", O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_mincore.c
171
fd = open(path, O_RDWR | O_CREAT, 0700);
tests/lib/libc/sys/t_mkdir.c
63
fd = open("/etc", O_RDONLY);
tests/lib/libc/sys/t_mkfifo.c
179
fd = open(path, O_RDONLY | O_NONBLOCK);
tests/lib/libc/sys/t_mkfifo.c
190
ATF_REQUIRE_ERRNO(ENXIO, open(path, O_WRONLY | O_NONBLOCK) == -1);
tests/lib/libc/sys/t_mkfifo.c
92
fd = open(path, O_RDONLY);
tests/lib/libc/sys/t_mknod.c
90
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_mmap.c
190
if ((fd = open(dev, O_RDONLY)) >= 0) {
tests/lib/libc/sys/t_mmap.c
253
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_mmap.c
306
fd = open(path, O_WRONLY | O_CREAT, 0700);
tests/lib/libc/sys/t_mmap.c
381
fd = open(path, O_RDWR | O_CREAT, 0700);
tests/lib/libc/sys/t_mmap.c
390
fd = open(path, O_RDONLY);
tests/lib/libc/sys/t_mmap.c
488
fd = open(path, O_RDWR | O_CREAT, 0700);
tests/lib/libc/sys/t_mmap.c
536
fd = open(path, O_RDWR | O_CREAT, 0700);
tests/lib/libc/sys/t_mprotect.c
91
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_msync.c
69
fd = open(path, O_RDWR | O_CREAT, 0700);
tests/lib/libc/sys/t_pipe2.c
60
while ((i = open("/", O_RDONLY)) < 3)
tests/lib/libc/sys/t_poll.c
1007
RL(appfd = open(pts, O_RDWR|O_NOCTTY));
tests/lib/libc/sys/t_poll.c
1028
RL(appfd = open(pts, O_RDWR|O_NOCTTY));
tests/lib/libc/sys/t_poll.c
283
RL(rfd = open(fifo_path, O_RDONLY | O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
284
RL(wfd = open(fifo_path, O_WRONLY | O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
410
RL(rfd = open(fifo_path, O_RDONLY | O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
411
RL(wfd = open(fifo_path, O_WRONLY));
tests/lib/libc/sys/t_poll.c
434
RL(wfd = open(fifo_path, O_WRONLY));
tests/lib/libc/sys/t_poll.c
462
RL(rfd = open(fifo_path, O_RDONLY | O_NONBLOCK));
tests/lib/libc/sys/t_poll.c
463
RL(wfd = open(fifo_path, O_WRONLY));
tests/lib/libc/sys/t_poll.c
934
RL(*pp = open(fifo_path, O_WRONLY));
tests/lib/libc/sys/t_poll.c
943
RL(*pp = open(fifo_path, O_RDONLY));
tests/lib/libc/sys/t_poll.c
958
RL(p1 = open(fifo_path, O_WRONLY));
tests/lib/libc/sys/t_poll.c
977
RL(p1 = open(fifo_path, O_RDONLY));
tests/lib/libc/sys/t_pollts.c
164
fd = open(_PATH_DEVNULL, O_RDONLY);
tests/lib/libc/sys/t_posix_fadvise.c
96
RL(fd = open("/dev/null", O_RDWR));
tests/lib/libc/sys/t_ptrace_core_wait.h
61
SYSCALL_REQUIRE((core_fd = open(core_path, O_RDONLY)) != -1);
tests/lib/libc/sys/t_revoke.c
137
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_revoke.c
70
buf[0] = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_revoke.c
74
buf[i] = open(path, O_RDWR);
tests/lib/libc/sys/t_select.c
97
if ((fd = open("/dev/null", O_RDONLY)) == -1)
tests/lib/libc/sys/t_setrlimit.c
187
fd = open(path, O_RDWR | O_CREAT, 0700);
tests/lib/libc/sys/t_setrlimit.c
330
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_setrlimit.c
379
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_setrlimit.c
389
fd = open("/etc/passwd", O_RDONLY);
tests/lib/libc/sys/t_socketpair.c
70
while ((i = open("/", O_RDONLY)) < 3)
tests/lib/libc/sys/t_stat.c
213
fd[i] = open(path, O_WRONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_stat.c
257
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_stat.c
291
fd = open(path, O_WRONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_stat.c
380
fd = open(path, O_WRONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_stat.c
67
fd = open(path, O_RDONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_syscall.c
71
fd = open(FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/lib/libc/sys/t_syscall.c
96
fd = open(FILE_NAME, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/lib/libc/sys/t_truncate.c
119
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_truncate.c
59
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_truncate.c
95
fd = open("/etc/passwd", O_RDONLY, 0400);
tests/lib/libc/sys/t_umask.c
127
fd = open(path, O_RDWR | O_CREAT, 0777);
tests/lib/libc/sys/t_unlink.c
115
ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1);
tests/lib/libc/sys/t_unlink.c
59
fd = open(path, O_RDWR | O_CREAT, 0666);
tests/lib/libc/sys/t_unlink.c
66
ATF_REQUIRE_ERRNO(ENOENT, open(path, O_RDONLY) == -1);
tests/lib/libc/sys/t_write.c
146
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/sys/t_write.c
176
fd = open(path, O_WRONLY | O_CREAT, 0600);
tests/lib/libc/sys/t_write.c
257
int fd = open(_PATH_DEVZERO, O_RDONLY);
tests/lib/libc/sys/t_write.c
74
fd = open(path, O_RDWR | O_CREAT, 0600);
tests/lib/libc/ttyio/t_ptm.c
152
REQUIRE_ERRNO((fds = open(pty, O_RDWR|O_NOCTTY)), -1);
tests/lib/libc/ttyio/t_ptm.c
67
if ((fdm = open("/dev/ptm", O_RDWR)) == -1) {
tests/lib/libcurses/director/director.c
222
if ((fd = open(termpath, O_RDONLY)) == -1)
tests/lib/libcurses/director/testlang_parse.y
928
else if ((check_fd = open(check_file, O_RDONLY, 0)) < 0) {
tests/lib/libcurses/director/testlang_parse.y
937
check_fd = open(check_file, O_WRONLY | O_CREAT, 0644);
tests/lib/libossaudio/t_ossaudio.c
299
if ((fd = open("/dev/audio", O_RDONLY)) == -1)
tests/lib/libossaudio/t_ossaudio.c
348
if ((fd = open("/dev/audio", O_WRONLY)) == -1)
tests/lib/libossaudio/t_ossaudio.c
403
if ((fd = open(dev, O_WRONLY)) == -1) {
tests/lib/libossaudio/t_ossaudio.c
404
if ((fd = open(dev, O_RDONLY)) == -1)
tests/lib/libossaudio/t_ossaudio.c
50
if ((fd = open("/dev/audio", O_WRONLY)) == -1)
tests/lib/libposix/t_rename.c
57
REQUIRE_LIBC(open("t1", O_CREAT | O_TRUNC | O_WRONLY, 0600), -1);
tests/lib/libpthread/t_cancellation.c
204
RL(fd = open("/dev/null", O_RDWR));
tests/lib/libpthread/t_cancellation.c
269
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
286
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
301
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
311
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
336
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
420
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
444
RL(open("file", O_RDWR));
tests/lib/libpthread/t_cancellation.c
482
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
512
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
609
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
620
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
632
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
815
RL(appfd = open(pts, O_RDWR|O_NOCTTY));
tests/lib/libpthread/t_cancellation.c
871
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_cancellation.c
883
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_compat_cancel.c
86
RL(fd = open("file", O_RDWR|O_CREAT, 0666));
tests/lib/libpthread/t_preempt.c
89
fd = open("/dev/urandom", O_RDONLY, 0);
tests/lib/librumphijack/h_client.c
102
fd = open("/rump/dev/null", O_RDWR);
tests/lib/librumphijack/h_client.c
126
if ((fd = open("/dev/null", O_RDWR)) == -1)
tests/lib/librumphijack/h_client.c
129
fd = open("/dev/null", O_RDWR);
tests/lib/librumphijack/h_client.c
134
if ((fd = open("/rump/dev/null", O_RDWR)) != 8)
tests/lib/librumphijack/h_cwd.c
70
fd = open(path, O_RDONLY);
tests/lib/librumphijack/h_netget.c
77
fd = open(argv[3], O_CREAT | O_RDWR, 0644);
tests/modules/t_kcov.c
108
fd = open("/dev/kcov", O_RDWR);
tests/modules/t_kcov.c
53
fd = open("/dev/kcov", O_RDWR);
tests/modules/t_kcov.c
94
fd2 = open("/dev/kcov", O_RDWR);
tests/net/fdpass/fdpass.c
205
fd = open("foo", O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/net/if_vlan/bpfopen.c
173
bpfd = open(path_bpf, O_RDONLY);
tests/net/net/t_ip_reass.c
173
fd = open("/dev/bpf0", O_RDWR);
tests/net/tcp/t_tcp_connect_port.c
112
fd = open(SYSCTLBAKFILE, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL,
tests/net/tcp/t_tcp_connect_port.c
153
fd = open(SYSCTLBAKFILE, O_RDONLY);
tests/rump/rumpvfs/t_etfs.c
275
RL(open("hostfile", O_RDWR | O_CREAT, 0777));
tests/rump/rumpvfs/t_etfs.c
68
etcfd = open("/etc/passwd", O_RDONLY);
tests/rump/rumpvfs/t_etfs.c
71
localfd = open("./testfile", O_RDWR | O_CREAT, 0666);
usr.bin/aiomixer/draw.c
58
fd = open(mixer_path, O_RDWR);
usr.bin/aiomixer/main.c
469
if ((aio->fd = open(device, O_RDWR)) < 0)
usr.bin/aiomixer/main.c
567
fd = open(mixer_path, O_RDWR);
usr.bin/at/at.c
211
if ((lockdes = open(_PATH_LOCKFILE, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR)) < 0)
usr.bin/at/at.c
253
if ((fdes = open(atfile, O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR)) == -1)
usr.bin/audio/ctl/ctl.c
118
{ "play.open", &info.play.open, UCHAR, READONLY },
usr.bin/audio/ctl/ctl.c
137
{ "record.open", &info.record.open, UCHAR, READONLY },
usr.bin/audio/ctl/ctl.c
367
fd = open(file, O_WRONLY);
usr.bin/audio/ctl/ctl.c
369
fd = open(file, O_RDONLY);
usr.bin/audio/ctl/ctl.c
372
fd = open(file, O_WRONLY);
usr.bin/audio/ctl/ctl.c
374
fd = open(file, O_RDONLY);
usr.bin/audio/play/play.c
181
audiofd = open(device, O_WRONLY);
usr.bin/audio/play/play.c
184
audiofd = open(device, O_WRONLY);
usr.bin/audio/play/play.c
328
fd = open(file, O_RDONLY);
usr.bin/audio/record/record.c
224
ti.outfd = open(*argv, O_CREAT|(aflag ? O_APPEND : O_TRUNC)|O_WRONLY, 0666);
usr.bin/audio/record/record.c
237
audiofd = open(device, O_RDONLY);
usr.bin/audio/record/record.c
240
audiofd = open(device, O_RDONLY);
usr.bin/audiocfg/audiodev.c
155
fd = open(DRVCTLDEV, O_RDONLY);
usr.bin/audiocfg/audiodev.c
305
adev->fd = open(adev->path, O_WRONLY);
usr.bin/audiocfg/audiodev.c
68
adev->ctlfd = open(adev->ctlpath, O_RDONLY);
usr.bin/bthset/bthset.c
459
mx = open(mixer, O_WRONLY, 0);
usr.bin/bthset/bthset.c
582
fd = open(pidfile, O_WRONLY | O_CREAT | O_TRUNC, 0644);
usr.bin/calendar/calendar.c
512
fd = open(pathname, flags | O_NONBLOCK);
usr.bin/calendar/calendar.c
556
return open(pathname, flags);
usr.bin/cdplay/cdplay.c
1402
da.afd = open(da.auname, O_WRONLY);
usr.bin/chpass/chpass.c
276
pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
usr.bin/chpass/edit.c
155
if ((fd = open(tempname, O_RDONLY|O_NOFOLLOW)) == -1 ||
usr.bin/cksum/cksum.c
444
if ((fd = open(filename, O_RDONLY, 0)) < 0) {
usr.bin/cksum/cksum.c
498
if ((fd = open(fn, O_RDONLY, 0)) < 0) {
usr.bin/cmp/cmp.c
105
else if ((fd1 = open(file1, O_RDONLY, 0)) < 0) {
usr.bin/cmp/cmp.c
118
else if ((fd2 = open(file2, O_RDONLY, 0)) < 0) {
usr.bin/config/main.c
1809
kernel = open(file, O_RDONLY);
usr.bin/config/main.c
1831
kfd = open(conffile, O_RDONLY);
usr.bin/crunch/crunchide/crunchide.c
240
fd = open(filename, O_RDWR, 0);
usr.bin/diff/diffreg.c
475
else if ((ifd = open(f, O_RDONLY, 0644)) == -1)
usr.bin/eject/eject.c
379
fd = open(dn, O_RDONLY);
usr.bin/eject/eject.c
416
fd = open(dn, O_RDONLY);
usr.bin/elf2aout/elf2aout.c
240
if ((infile = open(argv[0], O_RDONLY)) < 0)
usr.bin/elf2aout/elf2aout.c
396
if ((outfile = open(argv[1], O_WRONLY | O_CREAT, 0777)) < 0)
usr.bin/elf2ecoff/elf2ecoff.c
186
if ((infile = open(argv[0], O_RDONLY)) < 0)
usr.bin/elf2ecoff/elf2ecoff.c
391
if ((outfile = open(argv[1], O_WRONLY | O_CREAT, 0777)) < 0)
usr.bin/extattr/getextattr.c
294
if ((fd = open(filename, O_RDONLY, 0)) == -1)
usr.bin/fdformat/fdformat.c
241
fd = open(filename, O_RDWR);
usr.bin/fincore/fincore.c
123
fd = open(name, O_RDONLY);
usr.bin/find/main.c
151
if ((dotfd = open(".", O_RDONLY | O_CLOEXEC, 0)) == -1)
usr.bin/find/misc.c
154
ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC);
usr.bin/finger/lprint.c
339
if ((fd = open(tbuf, O_RDONLY)) < 0 || fstat(fd, &sb) ||
usr.bin/finger/util.c
183
fd = open(_PATH_LASTLOG, O_RDONLY, 0);
usr.bin/flock/flock.c
246
if ((fd = open(argv[0], O_RDONLY)) == -1) {
usr.bin/flock/flock.c
248
(fd = open(argv[0], O_RDWR|O_CREAT, 0600)) == -1)
usr.bin/ftp/ssl.c
242
fd = open(fname, O_RDONLY); /* XXX: fmode */
usr.bin/gencat/gencat.c
175
ofd = open(catfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
usr.bin/gencat/gencat.c
178
if ((ofd = open(catfile, O_RDWR)) < 0) {
usr.bin/gencat/gencat.c
203
if ((ifd = open(*argv, O_RDONLY)) < 0)
usr.bin/grep/file.c
257
} else if ((f->fd = open(path, O_RDONLY)) == -1) {
usr.bin/gzip/gzip.c
1332
in = open(file, O_RDONLY);
usr.bin/gzip/gzip.c
1381
out = open(outfile, O_WRONLY | O_CREAT | O_EXCL, 0600);
usr.bin/gzip/gzip.c
1456
fd = open(file, O_RDONLY);
usr.bin/gzip/gzip.c
1570
zfd = open(outfile, O_WRONLY|O_CREAT|O_EXCL, 0600);
usr.bin/gzip/gzip.c
1722
ofd = open(outfile, O_RDWR, 0);
usr.bin/gzip/gzip.c
1774
ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC);
usr.bin/gzip/gzip.c
2064
fd = open(path, O_RDONLY);
usr.bin/ktrace/ktrace.c
232
if ((fd = open(outfile, O_CREAT | O_WRONLY |
usr.bin/last/want.c
93
} else if ((wfd = open(file, O_RDONLY, 0)) < 0) {
usr.bin/ldd/ldd.c
178
fd = open(*argv, O_RDONLY);
usr.bin/login/common.c
139
if ((fd = open(fname ? fname : _PATH_MOTDFILE, O_RDONLY, 0)) < 0)
usr.bin/login/common.c
319
if ((fd = open(_PATH_LASTLOG, O_RDWR, 0)) >= 0) {
usr.bin/login/login.c
773
if ((fd = open(fname ? fname : _PATH_NOLOGIN, O_RDONLY, 0)) >= 0) {
usr.bin/look/look.c
142
if ((fd = open(file, O_RDONLY, 0)) < 0 || fstat(fd, &sb))
usr.bin/mail/collect.c
629
if ((nullfd = open("/dev/null", O_RDONLY, 0)) == -1) {
usr.bin/mail/dotlock.c
84
fd = open(path,
usr.bin/mail/lex.c
266
if ((i = open(name, O_WRONLY)) < 0)
usr.bin/mail/mime_attach.c
726
fd = open(canon_name, O_RDONLY, 0);
usr.bin/mail/mime_detach.c
128
if ((fd = open(fname, flags | O_CLOEXEC, 0600)) != -1 &&
usr.bin/mail/names.c
299
image = open(tempname, O_RDWR | O_CLOEXEC);
usr.bin/mail/popen.c
170
(void)open(_PATH_DEVNULL, O_RDONLY, 0);
usr.bin/make/arch.c
971
if ((fd = open(gn->path, O_RDONLY)) == -1)
usr.bin/make/filemon/filemon_dev.c
77
for (i = 0; (F->fd = open(_PATH_FILEMON, O_RDWR|O_CLOEXEC)) == -1; i++) {
usr.bin/make/job.c
1380
fd = open(file, O_RDWR | O_CREAT, 0666);
usr.bin/make/main.c
1648
fd = open(path, O_RDONLY);
usr.bin/make/main.c
1658
fd = open(path, O_RDONLY);
usr.bin/make/main.c
1667
fd = open(path, O_RDONLY);
usr.bin/make/main.c
1673
fd = open(fname, O_RDONLY);
usr.bin/make/main.c
1684
if (name == NULL || (fd = open(name, O_RDONLY)) == -1) {
usr.bin/make/parse.c
1325
if ((fd = open(fullname, O_RDONLY)) == -1) {
usr.bin/man/man.c
793
olddir = open(".", O_RDONLY);
usr.bin/man/man.c
901
if ((fd = open(fname, O_RDONLY, 0)) < 0) {
usr.bin/midiplay/midiplay.c
783
fd = open(file, O_WRONLY);
usr.bin/midirecord/midirecord.c
189
midifd = open(midi_device, O_RDONLY);
usr.bin/midirecord/midirecord.c
197
outfd = open(*argv, mode, 0666);
usr.bin/midirecord/midirecord.c
209
rawfd = open(raw_output, mode, 0666);
usr.bin/mixerctl/mixerctl.c
382
fd = open(file, O_RDWR);
usr.bin/mixerctl/mixerctl.c
386
fd = open(file, O_RDWR);
usr.bin/mkdep/mkdep.c
313
dependfile = open(filename, aflag, 0666);
usr.bin/mkdep/mkdep.c
331
fd = open(fname, O_RDONLY, 0);
usr.bin/mkubootimage/mkubootimage.c
576
kernel_fd = open(src, O_RDONLY);
usr.bin/mkubootimage/mkubootimage.c
581
image_fd = open(dest, O_WRONLY|O_CREAT|O_TRUNC, 0666);
usr.bin/nohup/nohup.c
117
if ((fd = open(p, O_RDWR|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR)) >= 0)
usr.bin/nohup/nohup.c
123
if ((fd = open(p = path, O_RDWR|O_CREAT|O_APPEND, S_IRUSR|S_IWUSR)) >= 0)
usr.bin/passwd/local_passwd.c
213
pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
usr.bin/passwd/local_passwd.c
322
pfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
usr.bin/patch/inp.c
232
devnull = open("/dev/null", O_RDONLY);
usr.bin/patch/inp.c
292
if ((ifd = open(filename, O_RDONLY)) < 0)
usr.bin/patch/inp.c
398
if ((tifd = open(TMPINNAME, O_EXCL | O_CREAT | O_WRONLY, 0666)) < 0)
usr.bin/patch/inp.c
460
if ((tifd = open(TMPINNAME, O_RDONLY)) < 0)
usr.bin/patch/util.c
175
tofd = open(to, O_CREAT|O_TRUNC|O_WRONLY, 0666);
usr.bin/patch/util.c
178
fromfd = open(from, O_RDONLY, 0);
usr.bin/patch/util.c
270
ttyfd = open(_PATH_TTY, O_RDONLY);
usr.bin/patch/util.c
70
fromfd = open(from, O_RDONLY);
usr.bin/pmap/main.c
369
n = open("/dev/null", O_RDWR);
usr.bin/progress/progress.c
134
if (infile && (fd = open(infile, O_RDONLY, 0)) < 0)
usr.bin/radioctl/radioctl.c
153
rd = open(radiodev, O_RDONLY);
usr.bin/rdist/docmd.c
548
if ((fd = open(file, 0)) < 0) {
usr.bin/rdist/server.c
1384
(void) open(_PATH_DEVNULL, O_RDONLY);
usr.bin/rdist/server.c
512
if ((f = open(target, O_RDONLY, 0)) < 0) {
usr.bin/rfcomm_sppd/rfcomm_sppd.c
314
if ((master = open(pty, O_RDWR)) == -1)
usr.bin/rump_allserver/rump_allserver.c
434
fd = open(etfs[i].hostpath, O_RDWR | oflags, 0644);
usr.bin/ruptime/ruptime.c
127
if ((fd = open(dp->d_name, O_RDONLY, 0)) < 0) {
usr.bin/rwho/rwho.c
134
f = open(dp->d_name, O_RDONLY);
usr.bin/scmdctl/scmdctl.c
217
fd = open(argv[0], O_RDWR, 0);
usr.bin/sdiff/sdiff.c
105
ifd = open(source_file, O_RDONLY, 0);
usr.bin/sed/compile.c
293
else if ((cmd->u.fd = open(p,
usr.bin/sed/compile.c
769
if (!aflag && (s->wfd = open(wfile,
usr.bin/sed/process.c
245
if (cp->u.fd == -1 && (cp->u.fd = open(cp->t,
usr.bin/sed/process.c
483
if (cp->u.s->wfd == -1 && (cp->u.s->wfd = open(cp->u.s->wfile,
usr.bin/shlock/shlock.c
140
while ((fd = open(tempname, O_RDWR|O_CREAT|O_TRUNC|O_SYNC|O_EXCL, 0644))
usr.bin/shlock/shlock.c
223
int fd = open(file, O_RDONLY);
usr.bin/shmif_dumpbus/shmif_dumpbus.c
156
fd = open(argv[0], O_RDONLY);
usr.bin/shmif_pcapin/shmif_pcapin.c
149
fd = open(argv[1], O_RDWR);
usr.bin/skeyinit/skeyinit.c
68
i = open(_PATH_DEVNULL, O_RDWR);
usr.bin/spell/spellprog/spellprog.c
357
wlists[i].fd = open(argv[i], O_RDONLY, 0);
usr.bin/split/split.c
140
(ifd = open(*argv, O_RDONLY, 0)) < 0)
usr.bin/split/split.c
367
if ((ofd = open(fname, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE)) < 0)
usr.bin/tcopy/tcopy.c
129
if ((outp = open(argv[1], op == VERIFY ? O_RDONLY :
usr.bin/tcopy/tcopy.c
138
if ((inp = open(inf, O_RDONLY, 0)) < 0)
usr.bin/tee/tee.c
101
if ((fd = open(*argv, append ? O_WRONLY|O_CREAT|O_APPEND :
usr.bin/tftp/main.c
438
fd = open(cp, O_RDONLY);
usr.bin/tftp/main.c
455
fd = open(argv[n], O_RDONLY);
usr.bin/tip/aculib/dn11.c
59
if ((dn = open(acu, O_WRONLY)) < 0) {
usr.bin/tip/aculib/dn11.c
88
if ((FD = open(DV, O_RDWR)) < 0) {
usr.bin/tip/aculib/v831.c
63
if ((AC = open(acu, O_RDWR)) < 0) {
usr.bin/tip/aculib/v831.c
91
if ((FD = open(DV, O_RDWR)) < 0) {
usr.bin/tip/cmds.c
115
if ((fd = open(cp, O_RDWR|O_CREAT, 0666)) < 0) {
usr.bin/tip/cmds.c
80
if ((sfd = open(cp, O_RDWR|O_CREAT, 0666)) < 0) {
usr.bin/tip/hunt.c
75
FD = open(cp, (O_RDWR | (DC ? O_NONBLOCK : 0)));
usr.bin/touch/touch.c
187
fd = open(*argv,
usr.bin/tset/misc.c
50
if ((fd = open(file, O_RDONLY, 0)) < 0)
usr.bin/unzip/unzip.c
664
if ((fd = open(*path, O_RDWR|O_CREAT|O_TRUNC, mode)) < 0)
usr.bin/usbhidaction/usbhidaction.c
152
fd = open(dev, O_RDWR | O_CLOEXEC);
usr.bin/usbhidctl/usbhid.c
1010
hidfd = open(dev, O_RDWR);
usr.bin/utoppya/utoppya.c
130
if ((toppy_fd = open(devpath, O_RDWR)) < 0)
usr.bin/videoctl/videoctl.c
149
video_fd = open(video_dev, wflag ? O_RDWR : O_RDONLY);
usr.bin/vndcompress/vndcompress.c
440
S->image_fd = open(image_pathname, O_RDONLY);
usr.bin/vndcompress/vndcompress.c
451
S->cloop2_fd = open(cloop2_pathname, oflags, 0777);
usr.bin/vndcompress/vnduncompress.c
68
const int cloop2_fd = open(cloop2_pathname, O_RDONLY);
usr.bin/vndcompress/vnduncompress.c
72
const int image_fd = open(image_pathname,
usr.bin/wc/wc.c
191
if ((fd = open(file, O_RDONLY, 0)) < 0) {
usr.bin/write/term_chk.c
77
fd = open(path, O_WRONLY, 0);
usr.bin/xargs/xargs.c
555
if ((fd = open(_PATH_TTY, O_RDONLY)) == -1)
usr.bin/xargs/xargs.c
558
fd = open(_PATH_DEVNULL, O_RDONLY);
usr.bin/xinstall/xinstall.c
753
if ((to_fd = open(to_name,
usr.bin/xinstall/xinstall.c
759
if ((from_fd = open(from_name, O_RDONLY, 0)) < 0) {
usr.bin/xinstall/xinstall.c
776
if ((to_fd = open(to_name, O_RDONLY, S_IRUSR | S_IWUSR)) < 0)
usr.bin/xinstall/xinstall.c
798
if ((to_fd = open(to_name, O_RDONLY, S_IRUSR | S_IWUSR)) < 0)
usr.bin/xlint/xlint/xlint.c
529
if ((ofd = open(dest, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
usr.bin/xlint/xlint/xlint.c
536
if ((ifd = open(src, O_RDONLY)) == -1) {
usr.sbin/acpitools/acpidump/acpi.c
4651
fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, mode);
usr.sbin/acpitools/acpidump/acpi.c
4695
fd = open(tmpstr, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
usr.sbin/acpitools/acpidump/acpi_user.c
239
if ((acpi_mem_fd = open(infile, O_RDONLY)) == -1)
usr.sbin/acpitools/acpidump/acpi_user.c
73
acpi_mem_fd = open("/dev/acpi", O_RDONLY);
usr.sbin/acpitools/acpidump/acpi_user.c
77
acpi_mem_fd = open("/dev/mem", O_RDONLY);
usr.sbin/acpitools/amldb/amldb.c
85
fd = open(dsdtfile, O_RDONLY, 0);
usr.sbin/altq/altqstat/altqstat.c
178
if ((qdiscfd = open(device, O_RDONLY)) < 0)
usr.sbin/altq/altqstat/qdisc_conf.c
88
if ((fd = open(ALTQ_DEVICE, O_RDONLY)) < 0) {
usr.sbin/altq/libaltq/qop.c
1358
if ((fd = open(RED_DEVICE, O_RDWR)) < 0) {
usr.sbin/altq/libaltq/qop.c
1389
if ((fd = open(RIO_DEVICE, O_RDWR)) < 0) {
usr.sbin/altq/libaltq/qop.c
1444
fd = open(devname, flags);
usr.sbin/altq/libaltq/qop.c
873
if ((fd = open(ALTQ_DEVICE, O_RDWR)) < 0)
usr.sbin/altq/libaltq/qop.c
948
if ((fd = open(ALTQ_DEVICE, O_RDWR)) < 0)
usr.sbin/altq/libaltq/qop_blue.c
205
(blue_fd = open(BLUE_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_cbq.c
927
(cbq_fd = open(CBQ_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_cdnr.c
672
(cdnr_fd = open(CDNR_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_fifoq.c
176
(fifoq_fd = open(FIFOQ_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_hfsc.c
996
(hfsc_fd = open(HFSC_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_jobs.c
522
(jobs_fd = open(JOBS_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_priq.c
355
(priq_fd = open(PRIQ_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_red.c
234
(red_fd = open(RED_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_rio.c
279
(rio_fd = open(RIO_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/libaltq/qop_wfq.c
209
(wfq_fd = open(WFQ_DEVICE, O_RDWR)) < 0 &&
usr.sbin/altq/tbrconfig/tbrconfig.c
115
if ((fd = open(ALTQ_DEVICE, O_RDWR)) < 0)
usr.sbin/altq/tbrconfig/tbrconfig.c
131
if ((fd = open(ALTQ_DEVICE, O_RDONLY)) < 0)
usr.sbin/altq/tbrconfig/tbrconfig.c
169
if ((fd = open(ALTQ_DEVICE, O_RDONLY)) < 0)
usr.sbin/apm/apm.c
232
fd = open(_PATH_APM_NORMAL, O_RDONLY);
usr.sbin/apm/apm.c
248
fd = open(_PATH_APM_CTLDEV, O_RDWR);
usr.sbin/apmd/apmd.c
235
spkrfd = open(_PATH_DEV_SPEAKER, O_WRONLY);
usr.sbin/apmd/apmd.c
398
if ((ctl_fd = open(fname, O_RDWR)) == -1) {
usr.sbin/arp/arp_hostops.c
46
.op_open = open,
usr.sbin/arp/prog_ops.h
66
#define prog_open open
usr.sbin/autofs/automountd.c
519
autofs_fd = open(AUTOFS_PATH, O_RDWR | O_CLOEXEC);
usr.sbin/autofs/automountd.c
523
autofs_fd = open(AUTOFS_PATH, O_RDWR | O_CLOEXEC);
usr.sbin/autofs/common.c
1179
fd = open(_PATH_DEVNULL, O_RDWR, 0);
usr.sbin/autofs/popen.c
88
nullfd = open(_PATH_DEVNULL, O_RDWR, 0);
usr.sbin/bootp/bootpd/bootpd.c
381
n = open("/dev/tty", O_RDWR);
usr.sbin/bootp/bootpgw/bootpgw.c
349
n = open("/dev/tty", O_RDWR);
usr.sbin/bootp/bootptest/bootptest.c
350
int fd = open(vendor_file, 0);
usr.sbin/bootp/bootptest/getether.c
203
fd = open(devname, 2);
usr.sbin/bootp/bootptest/getether.c
213
fd = open(devname, 2);
usr.sbin/bootp/bootptest/getether.c
91
nit = open("/dev/nit", 0);
usr.sbin/bootp/common/hwaddr.c
101
if ((fd=open("/dev/arp", O_RDWR)) < 0) {
usr.sbin/bta2dpd/bta2dpd/bta2dpd.c
1006
audfile = open(files2open[i], O_RDONLY);
usr.sbin/bta2dpd/bta2dpd/bta2dpd.c
874
audfile = open(files2open[currentFileInd], O_RDONLY);
usr.sbin/bta2dpd/bta2dpd/bta2dpd.c
918
audfile = open(files2open[0], flags, 0600);
usr.sbin/btattach/btattach.c
259
if ((fd = open(argv[0], O_RDWR | O_EXLOCK, 0)) < 0)
usr.sbin/btattach/btattach.c
598
if ((fd = open(tty, O_RDWR | O_NONBLOCK | O_EXLOCK, 0)) < 0)
usr.sbin/btattach/firmload.c
54
fd = open(f, O_RDONLY);
usr.sbin/btattach/init_stlc2500.c
74
ff = open(name, O_RDONLY, 0);
usr.sbin/btdevctl/btdevctl.c
240
fd = open(BTHUB_PATH, O_WRONLY, 0);
usr.sbin/bthcid/config.c
184
fd = open(new_key_file, O_WRONLY|O_TRUNC|O_CREAT|O_EXLOCK, 0600);
usr.sbin/bthcid/config.c
59
fd = open(key_file, O_RDONLY, 0);
usr.sbin/btpand/btpand.c
267
fd = open(_PATH_DEVNULL, O_RDWR, 0);
usr.sbin/btpand/tap.c
57
fd = open(interface_name, O_RDWR);
usr.sbin/cpuctl/cpuctl.c
107
if ((fd = open(_PATH_CPUCTL, O_RDWR)) < 0)
usr.sbin/crash/crash.c
396
fd = open(nlistf, O_RDONLY);
usr.sbin/dev_mkdb/dev_mkdb.c
77
fd = open(db_name_tmp, O_CREAT|O_EXCL|O_WRONLY, FILE_PERMISSION);
usr.sbin/dumpfs/dumpfs.c
179
fd = open(name, O_RDONLY);
usr.sbin/dumplfs/dumplfs.c
242
if ((fd = open(special, O_RDONLY, 0)) < 0)
usr.sbin/edquota/edquota.c
315
if ((fd = open(qup->qfname, O_WRONLY)) < 0) {
usr.sbin/edquota/edquota.c
360
if ((fd = open(qfpathname, O_RDONLY)) < 0) {
usr.sbin/edquota/edquota.c
361
fd = open(qfpathname, O_RDWR|O_CREAT, 0640);
usr.sbin/eeprom/eehandlers.c
537
fd = open(path_eeprom, wr == IO_WRITE ? O_RDWR : O_RDONLY, 0640);
usr.sbin/eeprom/ofhandlers.c
217
if ((fd = open(path_openfirm, O_RDONLY, 0640)) < 0)
usr.sbin/eeprom/ofhandlers.c
99
if ((fd = open(path_openfirm, arg ? O_RDWR : O_RDONLY, 0640)) < 0)
usr.sbin/eeprom/ophandlers.c
105
if ((fd = open(path_openprom, arg ? O_RDWR : O_RDONLY, 0640)) < 0)
usr.sbin/eeprom/ophandlers.c
209
if ((fd = open(path_openprom, O_RDONLY, 0640)) < 0)
usr.sbin/eeprom/ophandlers.c
87
if ((fd = open(path_openprom, O_RDONLY)) < 0)
usr.sbin/eeprom/prephandlers.c
189
if ((fd = open(path_prepnvram, O_RDONLY, 0640)) < 0)
usr.sbin/eeprom/prephandlers.c
95
if ((fd = open(path_prepnvram, arg ? O_RDWR : O_RDONLY, 0640)) < 0)
usr.sbin/emcfanctl/emcfanctl.c
247
fd = open(argv[0], O_RDWR, 0);
usr.sbin/envstat/envstat_hostops.c
43
.op_open = open,
usr.sbin/envstat/prog_ops.h
51
#define prog_open open
usr.sbin/extattrctl/extattrctl.c
130
if ((i = open(argv[1], flags, 0600)) == -1) {
usr.sbin/extattrctl/extattrctl.c
174
fd = open(argv[0], O_RDONLY);
usr.sbin/flashctl/flashctl.c
73
fd = open(device, O_RDWR, 0);
usr.sbin/fssconfig/fssconfig_hostops.c
45
.op_open = open,
usr.sbin/fssconfig/prog_ops.h
61
#define prog_open open
usr.sbin/fwctl/fwcontrol.c
639
*fd = open(_devname, O_RDWR);
usr.sbin/fwctl/fwdv.c
109
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
usr.sbin/fwctl/fwdv.c
287
fd = open(filename, O_RDONLY);
usr.sbin/fwctl/fwmpegts.c
157
fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0660);
usr.sbin/gpioctl/gpioctl.c
121
if ((devfd = open(dev, O_RDWR)) == -1)
usr.sbin/grfconfig/grfconfig.c
117
if ((grffd = open(grfdevice, O_RDWR)) == -1)
usr.sbin/hdaudioctl/hdaudioctl.c
344
fd = open(devpath, O_RDWR);
usr.sbin/i2cscan/i2cscan.c
196
fd = open(dev, O_RDWR);
usr.sbin/installboot/evboards.c
1124
if ((fd = open(params->dtb, O_RDONLY)) < 0) {
usr.sbin/installboot/evboards.c
1737
ifd = open(uboot_file, O_RDONLY);
usr.sbin/installboot/evboards.c
972
return open(openfirm_path, O_RDONLY);
usr.sbin/installboot/installboot.c
283
if ((params->fsfd = open(params->filesystem, mode, 0600)) == -1)
usr.sbin/installboot/installboot.c
307
if ((params->s1fd = open(argv[1], O_RDONLY, 0600)) == -1)
usr.sbin/iopctl/iopctl.c
130
if ((fd = open(dv, O_RDWR)) < 0)
usr.sbin/irdaattach/irdaattach.c
110
if ((fd = open(dev, O_RDWR | O_NDELAY)) < 0)
usr.sbin/isibootd/isibootd.c
378
fd = open(_PATH_BPF, O_RDWR, 0);
usr.sbin/isibootd/isibootd.c
383
fd = open(devbpf, O_RDWR, 0);
usr.sbin/iteconfig/iteconfig.c
264
fd = open(file, O_RDONLY | O_NONBLOCK);
usr.sbin/kvm_mkdb/kvm_mkdb.c
153
if ((fd = open(_PATH_KSYMS, O_RDONLY)) >= 0) {
usr.sbin/kvm_mkdb/nlist_aout.c
119
if ((fd = open(name, O_RDONLY, 0)) < 0) {
usr.sbin/kvm_mkdb/nlist_coff.c
106
if ((fd = open(name, O_RDONLY, 0)) < 0) {
usr.sbin/kvm_mkdb/nlist_ecoff.c
103
if ((fd = open(name, O_RDONLY, 0)) < 0) {
usr.sbin/kvm_mkdb/nlist_elf32.c
127
if ((fd = open(name, O_RDONLY, 0)) < 0) {
usr.sbin/ldpd/conffile.c
126
int confh = open(fname, O_RDONLY, 0);
usr.sbin/lockstat/main.c
259
fd = open(outf, O_WRONLY | O_CREAT | O_TRUNC, 0600);
usr.sbin/lockstat/main.c
271
nlfd = open(_PATH_KSYMS, O_RDONLY);
usr.sbin/lockstat/main.c
276
if ((nlfd = open(nlistf, O_RDONLY)) < 0)
usr.sbin/lockstat/main.c
313
if ((lsfd = open(_PATH_DEV_LOCKSTAT, O_RDONLY)) < 0)
usr.sbin/lpr/common_source/displayq.c
127
fd = open(ST, O_RDONLY);
usr.sbin/lpr/common_source/displayq.c
184
fd = open(ST, O_RDONLY);
usr.sbin/lpr/lpc/cmds.c
144
if ((fd = open(line, O_WRONLY|O_CREAT, 0760)) < 0)
usr.sbin/lpr/lpc/cmds.c
194
fd = open(statfile, O_WRONLY|O_CREAT, 0664);
usr.sbin/lpr/lpc/cmds.c
470
if ((fd = open(line, O_WRONLY|O_CREAT, 0670)) < 0)
usr.sbin/lpr/lpc/cmds.c
545
if ((fd = open(line, O_WRONLY|O_CREAT, 0770)) < 0)
usr.sbin/lpr/lpc/cmds.c
559
fd = open(line, O_WRONLY|O_CREAT, 0664);
usr.sbin/lpr/lpc/cmds.c
762
fd = open(line, O_RDONLY);
usr.sbin/lpr/lpc/cmds.c
771
fd = open(line, O_RDONLY);
usr.sbin/lpr/lpc/cmds.c
841
if ((fd = open(line, O_WRONLY|O_CREAT, 0760)) < 0)
usr.sbin/lpr/lpd/lpd.c
242
lfd = open(_PATH_MASTERLOCK, O_WRONLY|O_CREAT, 0644);
usr.sbin/lpr/lpd/printjob.c
1444
pfd = open(LP, RW ? O_RDWR : O_WRONLY);
usr.sbin/lpr/lpd/printjob.c
158
if ((fd = open(LF, O_WRONLY|O_APPEND, 0664)) < 0) {
usr.sbin/lpr/lpd/printjob.c
160
fd = open(_PATH_DEVNULL, O_WRONLY);
usr.sbin/lpr/lpd/printjob.c
1630
fd = open(ST, O_WRONLY|O_CREAT, 0664);
usr.sbin/lpr/lpd/printjob.c
185
lfd = open(LO, O_WRONLY|O_CREAT, 0644);
usr.sbin/lpr/lpd/printjob.c
550
if (lstat(file, &stb) < 0 || (fi = open(file, O_RDONLY)) < 0)
usr.sbin/lpr/lpd/printjob.c
734
n = open(tempfile, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0664);
usr.sbin/lpr/lpd/printjob.c
899
pfd = open(tempremote, O_WRONLY|O_CREAT|O_TRUNC|O_EXCL, 0664);
usr.sbin/lpr/lpd/printjob.c
917
if (lstat(file, &stb) < 0 || (f = open(file, O_RDONLY)) < 0)
usr.sbin/lpr/lpd/recvjob.c
219
fd = open(file, O_CREAT|O_EXCL|O_WRONLY, FILMOD);
usr.sbin/lpr/lpd/recvjob.c
93
if ((fd = open(LF, O_WRONLY|O_APPEND, 0664)) < 0) {
usr.sbin/lpr/lpd/recvjob.c
95
fd = open(_PATH_DEVNULL, O_WRONLY);
usr.sbin/lpr/lpr/lpr.c
369
if ((i = open(arg, O_RDONLY)) < 0) {
usr.sbin/lpr/lpr/lpr.c
391
if ((tfd = open(tfname, O_RDWR)) >= 0) {
usr.sbin/lpr/lpr/lpr.c
542
f = open(n, O_WRONLY | O_EXCL | O_CREAT, FILMOD);
usr.sbin/lpr/lpr/lpr.c
626
if ((fd = open(file, O_RDONLY)) < 0) {
usr.sbin/lpr/lpr/lpr.c
701
if ((fd = open(buf, O_RDWR|O_CREAT, 0664)) < 0)
usr.sbin/lptctl/lptctl.c
62
if ((fd = open(argv[1], O_RDONLY, 0)) == -1)
usr.sbin/makefs/chfs.c
166
if ((fsopts->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) {
usr.sbin/makefs/chfs/chfs_mkfs.c
245
fd = open(longname, O_RDONLY, 0444);
usr.sbin/makefs/ffs.c
490
if ((fsopts->fd = open(image, oflags, 0666)) == -1) {
usr.sbin/makefs/ffs.c
929
if ((ffd = open((char *)buf, O_RDONLY, 0444)) == -1) {
usr.sbin/makefs/msdos.c
183
fsopts->fd = open(image, O_RDWR);
usr.sbin/makefs/msdos/msdosfs_vnops.c
460
if ((fd = open(path, O_RDONLY)) == -1) {
usr.sbin/makefs/udf.c
825
f = open(path, O_RDONLY);
usr.sbin/makefs/v7fs.c
115
if ((fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0666)) == -1) {
usr.sbin/makefs/v7fs/v7fs_populate.c
167
if ((fd = open(filepath, O_RDONLY)) == -1) {
usr.sbin/mdsetimage/mdsetimage.c
126
if ((kfd = open(kfile, O_RDONLY, 0)) == -1)
usr.sbin/mdsetimage/mdsetimage.c
129
if ((kfd = open(kfile, O_RDWR, 0)) == -1)
usr.sbin/mdsetimage/mdsetimage.c
160
if ((fsfd = open(fsfile, O_WRONLY|O_CREAT, 0777)) == -1)
usr.sbin/mdsetimage/mdsetimage.c
164
if ((fsfd = open(fsfile, O_RDONLY, 0)) == -1)
usr.sbin/memswitch/memswitch.c
299
sramfd = open(_PATH_DEVSRAM, O_RDONLY);
usr.sbin/memswitch/memswitch.c
321
fd = open(PATH_RAMFILE, O_RDONLY);
usr.sbin/memswitch/memswitch.c
342
fd = open(PATH_RAMFILE, O_RDONLY);
usr.sbin/memswitch/memswitch.c
388
sramfd = open(_PATH_DEVSRAM, O_RDWR);
usr.sbin/memswitch/memswitch.c
398
sramfd = open(PATH_RAMFILE, O_WRONLY);
usr.sbin/memswitch/memswitch.c
422
fd = open(name, O_WRONLY|O_CREAT|O_TRUNC, 0666);
usr.sbin/memswitch/memswitch.c
453
fd = open(name, O_RDONLY);
usr.sbin/memswitch/memswitch.c
464
sramfd = open(_PATH_DEVSRAM, O_RDWR);
usr.sbin/mlxctl/main.c
116
if ((mlxfd = open(dv, O_RDWR)) < 0)
usr.sbin/mmcformat/uscsi_subr.c
244
disc->fhandle = open(disc->dev_name, O_RDWR | O_NONBLOCK, 0);
usr.sbin/mmcformat/uscsi_subr.c
381
disc->fhandle = open(disc->dev_name, O_RDWR | O_NONBLOCK, 0);
usr.sbin/mmcformat/uscsi_subr.c
82
disc->fhandle = open(disc->dev_name, O_RDWR, 0); /* no create */
usr.sbin/mopd/common/pf.c
95
fd = open(device, mode);
usr.sbin/mopd/mopchk/mopchk.c
117
dl.ldfd = open(filename, O_RDONLY, 0);
usr.sbin/mopd/mopcopy/mopcopy.c
111
dl.ldfd = open (argv[1], O_RDONLY);
usr.sbin/mopd/mopd/process.c
512
if ((nfd = open(filename, O_RDONLY, 0)) != -1) {
usr.sbin/mopd/mopd/process.c
528
dl_rpr->ldfd = open(filename, O_RDONLY, 0);
usr.sbin/moused/moused.c
776
if ((rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK, 0))
usr.sbin/moused/moused.c
860
if ((rodent.cfd = open(wsm, O_WRONLY, 0)) == -1)
usr.sbin/mtree/compare.c
409
if ((fd = open(p->fts_accpath, O_RDONLY, 0)) < 0) {
usr.sbin/mtree/create.c
207
if ((fd = open(fname, O_RDONLY)) == -1)
usr.sbin/ndbootd/config/ndbootd-bpf.c
118
if ((network_fd = open(dev_bpf_filename, O_RDWR)) < 0) {
usr.sbin/ndbootd/ndbootd.c
496
if ((fd = open(NDBOOTD_PID_FILE, O_WRONLY | O_CREAT | O_TRUNC, 0644)) >= 0) {
usr.sbin/ndbootd/ndbootd.c
654
if ((boot1_fd = open(boot1_file_name, O_RDONLY)) < 0) {
usr.sbin/ndbootd/ndbootd.c
694
if ((boot2_fd = open(boot2_file_name, O_RDONLY)) < 0) {
usr.sbin/ndp/ndp_hostops.c
46
.op_open = open,
usr.sbin/ndp/prog_ops.h
65
#define prog_open open
usr.sbin/nfsd/nfsd.c
314
(fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
usr.sbin/nfsd/nfsd.c
366
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
usr.sbin/npf/npfctl/npf_build.c
151
if ((fd = open(outfile, O_CREAT | O_TRUNC | O_WRONLY, 0644)) == -1) {
usr.sbin/npf/npfctl/npfctl.c
310
if ((fd = open(path, O_RDONLY)) == -1) {
usr.sbin/npf/npfctl/npfctl.c
372
if ((fd = open(path, O_RDONLY)) == -1) {
usr.sbin/npf/npfd/npfd.c
59
fd = open(NPF_DEV_PATH, O_RDONLY);
usr.sbin/npf/npftest/npftest.c
101
if ((fd = open(fpath, O_RDONLY)) == -1) {
usr.sbin/ofctl/ofctl.c
304
fd = open(file, O_RDONLY);
usr.sbin/paxctl/paxctl.c
203
fd = open(name, list ? O_RDONLY: O_RDWR, 0);
usr.sbin/pcictl/pcictl.c
142
pcifd = open(dvname, commands[i].open_flags);
usr.sbin/pf/pfs/pfs.c
132
wfd = open(filename, O_WRONLY|O_TRUNC|O_CREAT, 0600);
usr.sbin/pf/pfs/pfs.c
183
rfd = open(filename, O_RDONLY, 0600);
usr.sbin/pf/pfs/pfs.c
538
fd = open(pf_device, O_RDWR);
usr.sbin/powerd/powerd_hostops.c
44
.op_open = open,
usr.sbin/powerd/prog_ops.h
64
#define prog_open open
usr.sbin/puffs/mount_9p/ninepuffs.c
130
s = open(path, O_RDWR, 0);
usr.sbin/puffs/mount_9p/ninepuffs.c
234
PUFFSOP_SET(pops, puffs9p, node, open);
usr.sbin/puffs/mount_psshfs/psshfs.c
259
PUFFSOP_SET(pops, psshfs, node, open);
usr.sbin/puffs/mount_psshfs/psshfs.c
458
dnfd = open(_PATH_DEVNULL, O_RDWR);
usr.sbin/puffs/rump_nqmfs/rump_nqmfs.c
113
fd = open(mntfile, rdonly ? O_RDONLY: O_RDWR);
usr.sbin/pwd_mkdb/pwd_mkdb.c
399
if ((tfd = open(oldpwdfile, O_WRONLY | O_CREAT | O_EXCL,
usr.sbin/pwd_mkdb/pwd_mkdb.c
643
if ((from_fd = open(from, O_RDONLY, 0)) < 0)
usr.sbin/pwd_mkdb/pwd_mkdb.c
645
if ((to_fd = open(to, O_WRONLY | O_CREAT | O_EXCL, mode)) < 0) {
usr.sbin/quot/quot.c
555
if ((fd = open(name, 0)) < 0) {
usr.sbin/quotacheck/quotacheck.c
341
if ((fi = open(fsname, O_RDONLY, 0)) < 0) {
usr.sbin/rarpd/rarpd.c
281
fd = open(device, O_RDWR);
usr.sbin/rbootd/bpf.c
97
BpfFd = open(_PATH_BPF, O_RDWR);
usr.sbin/rbootd/rmpproto.c
370
if ((rconn->bootfd = open(filename, O_RDONLY, 0600)) < 0) {
usr.sbin/rmt/rmt.c
109
tape = open(device, atoi(mode),
usr.sbin/rpc.yppasswdd/yppasswdd_mkpw.c
134
pfd = open(mpwd, O_RDONLY, 0);
usr.sbin/rpcbind/rpcb_svc_com.c
415
if ((fd = open("/dev/null", O_RDONLY)) == -1) {
usr.sbin/rpcbind/rpcbind.c
178
if ((rpcbindlockfd = open(RPCBINDDLOCK, O_RDONLY|O_CREAT, 0444)) == -1)
usr.sbin/rpcbind/warmstart.c
81
fd = open(filename, O_WRONLY|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR);
usr.sbin/rtadvd/advcap.c
139
tf = open(RM = cp, O_RDONLY);
usr.sbin/rtadvd/prog_ops.h
65
#define prog_open open
usr.sbin/rtadvd/rtadvd_hostops.c
18
.op_open = open,
usr.sbin/rwhod/rwhod.c
307
whod = open(path, O_WRONLY | O_CREAT, 0644);
usr.sbin/screenblank/screenblank.c
176
if ((fd = open(display, O_RDONLY, 0666)) == -1)
usr.sbin/screenblank/screenblank.c
305
if ((fd = open(path, O_RDWR, 0666)) == -1) {
usr.sbin/screenblank/screenblank.c
355
if ((fd = open(dsp->ds_path, O_RDWR, 0)) == -1) {
usr.sbin/screenblank/screenblank.c
383
if ((fd = open(dsp->ds_path, O_RDWR, 0)) == -1) {
usr.sbin/services_mkdb/output_cdb.c
55
if ((cdbw_fd = open(tname, O_WRONLY | O_CREAT | O_TRUNC, 0666)) == -1) {
usr.sbin/sesd/srcs/chpmon.c
72
fd = open(v[dev], O_RDWR);
usr.sbin/sesd/srcs/getencstat.c
74
fd = open(*v, O_RDONLY);
usr.sbin/sesd/srcs/getnobj.c
52
fd = open(name, O_RDONLY);
usr.sbin/sesd/srcs/getobjmap.c
53
fd = open(*v, O_RDONLY);
usr.sbin/sesd/srcs/getobjstat.c
57
fd = open(v[1], O_RDONLY);
usr.sbin/sesd/srcs/inienc.c
50
fd = open(*v, O_RDWR);
usr.sbin/sesd/srcs/sesd.c
119
fd = open(v[dev], O_RDWR);
usr.sbin/sesd/srcs/sesd.c
94
fd = open(v[dev], O_RDWR);
usr.sbin/sesd/srcs/setencstat.c
55
fd = open(v[1], O_RDWR);
usr.sbin/sesd/srcs/setobjstat.c
59
fd = open(v[1], O_RDWR);
usr.sbin/sliplogin/sliplogin.c
251
if ((fd = open("/dev/tty", O_RDONLY, 0)) >= 0) {
usr.sbin/sliplogin/sliplogin.c
257
fd = open(ttyname(0), O_RDWR, 0);
usr.sbin/sliplogin/sliplogin.c
264
if ((fd = open(argv[2], O_RDWR)) == -1) {
usr.sbin/sliplogin/sliplogin.c
344
if ((fd = open(_PATH_DEVNULL, O_WRONLY)) != 1) {
usr.sbin/srtconfig/srtconfig.c
100
devfd = open(txt_dev,how,0);
usr.sbin/sti/sti.c
176
if ((fd = open(ttydev, O_RDWR)) == -1)
usr.sbin/sunlabel/sunlabel.c
233
if ((diskfd = open(s, O_RDWR)) == -1 ||
usr.sbin/sunlabel/sunlabel.c
234
(diskfd = open(s, O_RDWR | O_NONBLOCK)) == -1) {
usr.sbin/sunlabel/sunlabel.c
235
if ((diskfd = open(s, O_RDONLY)) == -1) {
usr.sbin/sysinst/aout2elf.c
327
if ((fd = open(".", O_RDONLY)) < 0) {
usr.sbin/sysinst/aout2elf.c
95
fd = open(name, O_RDONLY);
usr.sbin/sysinst/arch/acorn32/md.c
77
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/alpha/md.c
71
fd = open (dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/cats/md.c
76
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/emips/md.c
71
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/evbsh3/md.c
59
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/ews4800mips/md.c
73
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/hp300/md.c
70
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/hpcarm/md.c
203
fd = open(adevname, O_RDWR);
usr.sbin/sysinst/arch/hppa/md.c
74
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/i386/md.c
846
fd = open(path, O_RDONLY);
usr.sbin/sysinst/arch/luna68k/md.c
77
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/mac68k/md.c
148
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/mac68k/md.c
379
if ((fd = open(dev_name, O_WRONLY, 0)) < 0) {
usr.sbin/sysinst/arch/mac68k/md.c
467
if ((fd = open(dev_name, O_RDONLY, 0)) < 0)
usr.sbin/sysinst/arch/mac68k/md.c
765
if ((fd = open(dev_name, O_RDONLY, 0)) >= 0) {
usr.sbin/sysinst/arch/macppc/md.c
71
fd = open (dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/mipsco/md.c
72
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/mvme68k/md.c
70
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/news68k/md.c
72
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/newsmips/md.c
71
fd = open (dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/pmax/md.c
71
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/sgimips/md.c
88
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/shark/md.c
74
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/vax/md.c
74
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/virt68k/md.c
70
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/x68k/md.c
87
fd = open(dev_name, O_RDONLY, 0);
usr.sbin/sysinst/arch/zaurus/md.c
177
fd = open(adevname, O_RDWR);
usr.sbin/sysinst/disks.c
1902
fd = open(disk, O_RDONLY);
usr.sbin/sysinst/disks.c
359
fd = open("/dev/drvctl", O_RDONLY);
usr.sbin/sysinst/run.c
453
(void)open("/dev/null", O_RDWR, 0);
usr.sbin/sysinst/util.c
1219
fd = open(_PATH_RANDOM, O_RDWR, 0);
usr.sbin/sysinst/util.c
2702
fd = open(DRVCTLDEV, O_RDONLY, 0);
usr.sbin/sysinst/util.c
489
dev = open(dname, O_RDONLY, 0);
usr.sbin/sysinst/util.c
513
dev = open(dname, O_RDONLY, 0);
usr.sbin/sysinst/wskbd.c
104
fd = open("/dev/wskbd0", O_WRONLY);
usr.sbin/syslogd/syslogd.c
1935
f->f_file = open(ctty, O_WRONLY | O_NDELAY, 0);
usr.sbin/syslogd/syslogd.c
2526
f->f_file = open(f->f_un.f_fname,
usr.sbin/syslogd/syslogd.c
2563
open(f->f_un.f_fname, O_WRONLY|O_NONBLOCK, 0);
usr.sbin/syslogd/syslogd.c
4000
if ((f->f_file = open(p, O_WRONLY|O_APPEND|O_NONBLOCK, 0)) < 0)
usr.sbin/syslogd/syslogd.c
4226
if ((nulldesc = open(_PATH_DEVNULL, O_RDWR)) == -1) {
usr.sbin/syslogd/syslogd.c
537
if ((fklog = open(_PATH_KLOG, O_RDONLY, 0)) < 0) {
usr.sbin/tadpolectl/tadpolectl.c
757
if ((dev = open(TCTRL_DEV, O_RDONLY, NULL)) == -1)
usr.sbin/tpctl/data.c
278
if ((fd = open(tempfile, O_RDWR|O_CREAT|O_EXCL, 0644)) < 0) {
usr.sbin/tpctl/main.c
132
if ((tpfd = open(dev_name, O_RDWR)) < 0)
usr.sbin/tpctl/main.c
265
if ((fbfd = open(dev, O_RDWR)) < 0)
usr.sbin/tprof/ksyms.c
83
fd = open(_PATH_KSYMS, O_RDONLY);
usr.sbin/tprof/tprof.c
449
outfd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0666);
usr.sbin/tprof/tprof.c
565
devfd = open(_PATH_TPROF, O_RDWR);
usr.sbin/traceroute/traceroute.c
463
if (open(devnull, O_RDONLY) < 0 ||
usr.sbin/traceroute/traceroute.c
464
open(devnull, O_RDONLY) < 0 ||
usr.sbin/traceroute/traceroute.c
465
open(devnull, O_RDONLY) < 0)
usr.sbin/umcpmioctl/umcpmioctl.c
145
fd = open(argv[0], O_RDWR, 0);
usr.sbin/usbdevs/usbdevs.c
426
int fd = open(DRVCTLDEV, O_RDONLY, 0);
usr.sbin/usbdevs/usbdevs.c
437
f = open(buf, O_RDONLY);
usr.sbin/usbdevs/usbdevs.c
453
f = open(dev, O_RDONLY);
usr.sbin/user/user.c
1091
if ((masterfd = open(_PATH_MASTERPASSWD, O_RDONLY)) < 0) {
usr.sbin/user/user.c
1453
if ((masterfd = open(_PATH_MASTERPASSWD, O_RDONLY)) < 0) {
usr.sbin/videomode/videomode.c
106
if ((grffd = open(grfname, 2)) < 0)
usr.sbin/vipw/vipw.c
105
pfd = open(mpwd, O_RDONLY, 0);
usr.sbin/vnconfig/vnconfig.c
353
ffd = open(file, readonly ? O_RDONLY : O_RDWR);
usr.sbin/wakeonlan/wakeonlan.c
197
if ((bpf = open(_PATH_BPF, O_RDWR)) == -1)
usr.sbin/wsconscfg/wsconscfg.c
126
if ((wsfd = open(wsdev, get ? O_RDONLY : O_RDWR)) == -1)
usr.sbin/wsfontload/wsfontload.c
203
wsfd = open(wsdev, listfonts ? O_RDONLY : O_RDWR, 0);
usr.sbin/wsfontload/wsfontload.c
227
ffd = open(argv[0], O_RDONLY, 0);
usr.sbin/wsmoused/selection.c
406
Selmouse.sm_ttyfd = open(buf, O_RDONLY | O_NONBLOCK);
usr.sbin/wsmoused/wsmoused.c
237
Mouse.m_fifofd = open(Mouse.m_fifoname,
usr.sbin/wsmoused/wsmoused.c
261
Mouse.m_devfd = open(Mouse.m_devname, O_RDONLY | O_NONBLOCK, 0);
usr.sbin/wsmoused/wsmoused.c
577
Mouse.m_statfd = open(tstat, O_RDONLY | O_NONBLOCK, 0);
usr.sbin/wsmuxctl/wsmuxctl.c
101
rfd = open(buf, O_WRONLY, 0);
usr.sbin/wsmuxctl/wsmuxctl.c
160
wsfd = open(wsdev, O_WRONLY, 0);
usr.sbin/wsmuxctl/wsmuxctl.c
165
wsfd = open(wsdev, O_WRONLY, 0);
usr.sbin/ypbind/ypbind.c
151
fd = open(path, flags|O_SHLOCK, mode);