bin/chio/chio.c
147
if ((changer_fd = open(changer_name, O_RDWR, 0600)) == -1)
bin/dd/dd.c
186
out.fd = open(out.name, O_RDWR | oflags, DEFFILEMODE);
bin/pax/ar_io.c
61
#define APP_MODE O_RDWR /* mode for append */
bin/pax/tty_subs.c
65
if ((ttyfd = open(DEVTTY, O_RDWR)) >= 0) {
bin/pkill/tests/spin_helper.c
101
fd = open(argv[2], O_RDWR | O_CREAT, 0755);
bin/sh/jobs.c
182
if ((ttyfd = open(_PATH_TTY, O_RDWR | O_CLOEXEC)) < 0) {
bin/sh/redir.c
182
if ((f = open(fname, O_RDWR|O_CREAT, 0666)) < 0)
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1003
i = open(line, O_RDWR);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1029
if ((t = open("/dev/tty", O_RDWR)) < 0)
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1046
close(open(line, O_RDWR));
crypto/heimdal/appl/telnet/telnetd/sys_term.c
1494
f = open(utmpf, O_RDWR);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
382
p = _getpty(&master, O_RDWR, 0600, 1);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
398
p=open(*q, O_RDWR);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
444
p = open(line, O_RDWR);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
838
t = open(_PATH_TTY, O_RDWR);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
976
t = open(line, O_RDWR|O_NOCTTY);
crypto/heimdal/appl/telnet/telnetd/sys_term.c
992
t = open(line, O_RDWR|O_NOCTTY);
crypto/heimdal/appl/telnet/telnetd/telnetd.c
957
t = open(_PATH_TTY, O_RDWR);
crypto/heimdal/kadmin/init.c
150
ret = db->hdb_open(context, db, O_RDWR | O_CREAT, 0600);
crypto/heimdal/kadmin/load.c
370
int flags = O_RDWR;
crypto/heimdal/kdc/hpropd.c
218
ret = db->hdb_open(context, db, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/lib/hdb/ndbm.c
147
*fd = open(lock_file, O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/chpass_s.c
170
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/chpass_s.c
52
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/create_s.c
131
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/create_s.c
184
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/delete_s.c
46
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/get_princs_s.c
88
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/iprop-log.c
393
O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/ipropd_slave.c
306
O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/ipropd_slave.c
371
ret = mydb->hdb_open(context, mydb, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/lib/kadm5/log.c
100
fd = open (log_context->log_file, O_RDWR | O_CREAT, 0600);
crypto/heimdal/lib/kadm5/log.c
134
fd = open (log_context->log_file, O_RDWR | O_CREAT | O_TRUNC, 0600);
crypto/heimdal/lib/kadm5/modify_s.c
53
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/randkey_s.c
54
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kadm5/rename_s.c
51
ret = context->db->hdb_open(context->context, context->db, O_RDWR, 0);
crypto/heimdal/lib/kafs/afssys.c
171
fd = open(path, O_RDWR);
crypto/heimdal/lib/kafs/afssys.c
213
fd = open(afs_ioctlpath, O_RDWR);
crypto/heimdal/lib/krb5/fcache.c
258
fd = open(filename, O_RDWR | O_BINARY);
crypto/heimdal/lib/krb5/fcache.c
387
(flags | O_RDWR) == flags);
crypto/heimdal/lib/krb5/fcache.c
430
ret = fcc_open(context, id, &fd, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/keytab_file.c
552
fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC);
crypto/heimdal/lib/krb5/keytab_file.c
554
fd = open (d->filename, O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/keytab_file.c
737
ret = fkt_start_seq_get_int(context, id, O_RDWR | O_BINARY | O_CLOEXEC, 1, &cursor);
crypto/heimdal/lib/krb5/keytab_keyfile.c
333
fd = open (d->filename, O_RDWR | O_BINARY | O_CLOEXEC);
crypto/heimdal/lib/krb5/keytab_keyfile.c
336
O_RDWR | O_BINARY | O_CREAT | O_EXCL | O_CLOEXEC, 0600);
crypto/heimdal/lib/krb5/test_store.c
304
fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0600);
crypto/heimdal/lib/krb5/test_store.c
321
fd = open(fn, O_RDWR|O_CREAT|O_TRUNC, 0600);
crypto/heimdal/lib/roken/daemon.c
70
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
crypto/heimdal/lib/roken/mkstemp.c
64
fd = open(template, O_RDWR | O_CREAT | O_EXCL, 0600);
crypto/heimdal/lib/roken/rkpty.c
118
master = open(*q, O_RDWR);
crypto/heimdal/lib/roken/rkpty.c
127
slave = open(line, O_RDWR);
crypto/krb5/src/kprop/kpropd.c
295
devnull = open("/dev/null", O_RDWR);
crypto/krb5/src/kprop/kpropd.c
548
lock_fd = open(temp_file_name, O_RDWR | O_CREAT, 0600);
crypto/krb5/src/lib/apputils/daemon.c
73
n = open("/dev/tty", O_RDWR);
crypto/krb5/src/lib/apputils/daemon.c
85
int devnull = open(_PATH_DEVNULL, O_RDWR, 0);
crypto/krb5/src/lib/kdb/kdb_log.c
515
log_ctx->ulogfd = open(logname, O_RDWR | O_CREAT, 0600);
crypto/krb5/src/lib/kdb/kdb_log.c
526
log_ctx->ulogfd = open(logname, O_RDWR, 0600);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
1079
fd = open(data->filename, O_RDWR | O_BINARY | O_CLOEXEC);
crypto/krb5/src/lib/krb5/ccache/cc_file.c
341
flags = writable ? (O_RDWR | O_APPEND) : O_RDONLY;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
482
flags = O_CREAT | O_EXCL | O_RDWR | O_BINARY | O_CLOEXEC;
crypto/krb5/src/lib/krb5/ccache/cc_file.c
565
fd = open(data->filename, O_RDWR | O_BINARY | O_CLOEXEC, 0);
crypto/krb5/src/lib/krb5/ccache/t_marshal.c
374
fd = open(filename, O_CREAT|O_TRUNC|O_RDWR, 0700);
crypto/krb5/src/lib/krb5/os/krbfileio.c
59
fd = THREEPARAMOPEN(pathname, O_RDWR | O_CREAT | O_EXCL | O_BINARY, 0600);
crypto/krb5/src/lib/krb5/rcache/rc_dfl.c
103
fd = open(fname, O_CREAT | O_RDWR | O_NOFOLLOW, 0600);
crypto/krb5/src/lib/krb5/rcache/rc_dfl.c
70
*fd_out = open(fname, O_CREAT | O_RDWR | O_BINARY, 0600);
crypto/krb5/src/lib/krb5/rcache/rc_file2.c
248
fd = open(filename, O_CREAT | O_RDWR | O_BINARY, 0600);
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
301
fd = THREEPARAMOPEN(db->lock->filename,O_RDWR | O_CREAT | O_EXCL,
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
329
db->db = dbopen(db->filename, O_RDWR, 0600, DB_BTREE, &db->btinfo);
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
331
db->db = dbopen(db->filename, O_RDWR, 0600, DB_HASH, &db->info);
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
36
db = dbopen(filename, O_RDWR | O_CREAT | O_EXCL, 0600, DB_BTREE, &btinfo);
crypto/krb5/src/plugins/kdb/db2/adb_openclose.c
43
lf = THREEPARAMOPEN(lockfilename, O_RDWR | O_CREAT | O_EXCL, 0600);
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
454
kmode == KRB5_LOCKMODE_SHARED ? O_RDONLY : O_RDWR,
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
496
if ((dbc->db_lf_file = open(dbc->db_lf_name, O_RDWR, 0666)) < 0) {
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
626
fd = open(filename, O_RDWR, 0);
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
697
dbc->db_lf_file = open(dbc->db_lf_name, O_CREAT | O_RDWR | O_TRUNC,
crypto/krb5/src/plugins/kdb/db2/kdb_db2.c
718
retval = open_db(context, dbc, O_RDWR | O_CREAT | O_EXCL, 0600, &dbc->db);
crypto/krb5/src/plugins/kdb/db2/libdb2/btree/bt_open.c
197
case O_RDWR:
crypto/krb5/src/plugins/kdb/db2/libdb2/btree/bt_open.c
208
if ((flags & O_ACCMODE) != O_RDWR)
crypto/krb5/src/plugins/kdb/db2/libdb2/db/db.c
55
O_RDWR | O_SHLOCK | O_TRUNC | O_BINARY)
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/dbm.c
76
if ((__cur_db = kdb2_dbm_open(file, O_RDWR|O_BINARY, 0)) != NULL)
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hash.c
120
hashp->save_file = hashp->flags & O_RDWR;
crypto/krb5/src/plugins/kdb/db2/libdb2/hash/hsearch.c
63
dbp = (DB *)__hash_open(NULL, O_CREAT | O_RDWR | O_BINARY, 0600, &info, 0);
crypto/krb5/src/plugins/kdb/db2/libdb2/include/db-int.h
226
#define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR)
crypto/krb5/src/plugins/kdb/db2/libdb2/recno/rec_open.c
146
case O_RDWR:
crypto/krb5/src/plugins/kdb/db2/libdb2/recno/rec_open.c
91
O_RDWR | O_BINARY, S_IRUSR | S_IWUSR, &btopeninfo, dflags);
crypto/krb5/src/plugins/kdb/db2/libdb2/recno/rec_open.c
93
dbp = __bt_open(NULL, O_RDWR | O_BINARY, S_IRUSR | S_IWUSR, NULL, dflags);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c
25
if ((dbp = dbopen("test.db",O_RDWR | O_CREAT | O_BINARY, 0664
crypto/krb5/src/plugins/kdb/db2/libdb2/test/SEQ_TEST/t.c
45
if ((dbp = dbopen("test.db", O_RDWR | O_BINARY, 0664
crypto/krb5/src/plugins/kdb/db2/libdb2/test/btree.tests/main.c
229
omode = O_RDWR;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/dbtest.c
137
oflags = O_CREAT | O_RDWR | O_BINARY;
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/driver2.c
84
if (!(db = dbopen("bigtest", O_RDWR | O_CREAT | O_BINARY, 0644, DB_HASH, &info))) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tcreat3.c
75
O_CREAT|O_TRUNC|O_RDWR|O_BINARY, 0600, DB_HASH, &ctl))){
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/tdel.c
77
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR|O_BINARY, 0400, DB_HASH, &ctl))) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash1.tests/thash4.c
78
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR|O_BINARY, 0400, DB_HASH, &ctl))) {
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/bigtest.c
23
db = dbopen("big2.db", O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0664, DB_HASH, &info);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c
101
db = dbopen("/usr/tmp/passwd.db", O_RDWR, 0664, DB_HASH, &passwd);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c
126
db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_BINARY, 0664, DB_HASH, &passwd);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c
154
db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_BINARY, 0664, DB_HASH, &passwd);
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c
33
db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_CREAT|O_TRUNC|O_BINARY, 0664, DB_HASH,
crypto/krb5/src/plugins/kdb/db2/libdb2/test/hash2.tests/passtest.c
69
db = dbopen("/usr/tmp/passwd.db", O_RDWR|O_BINARY, 0664, DB_HASH, &passwd);
crypto/krb5/src/plugins/kdb/lmdb/kdb_lmdb.c
436
fd = open(filename, O_RDWR | O_CLOEXEC, 0);
crypto/krb5/src/util/support/mkstemp.c
114
open(path, O_CREAT|O_EXCL|O_RDWR|O_BINARY, 0600)) >= 0)
crypto/openssh/loginrec.c
1601
if (!lastlog_openseek(li, &fd, O_RDWR|O_CREAT))
crypto/openssh/loginrec.c
865
if (tty > 0 && (fd = open(UTMP_FILE, O_RDWR|O_CREAT, 0644)) >= 0) {
crypto/openssh/misc.c
1472
fd = open(name, O_RDWR);
crypto/openssh/misc.c
1477
if ((fd = open(name, O_RDWR)) >= 0)
crypto/openssh/misc.c
1535
if ((nullfd = dupfd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
crypto/openssh/misc.c
2733
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) {
crypto/openssh/misc.c
2850
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1) {
crypto/openssh/openbsd-compat/bsd-openpty.c
104
if ((*aslave = open(pts, O_RDWR | O_NOCTTY)) == -1) {
crypto/openssh/openbsd-compat/bsd-openpty.c
142
if ((slave = _getpty(amaster, O_RDWR, 0622, 0)) == NULL)
crypto/openssh/openbsd-compat/bsd-openpty.c
146
if ((*aslave = open(slave, O_RDWR | O_NOCTTY)) == -1) {
crypto/openssh/openbsd-compat/bsd-openpty.c
169
if (junk_ptyfd == -1 && (fd = open(_PATH_TTY, O_RDWR|O_NOCTTY)) >= 0) {
crypto/openssh/openbsd-compat/bsd-openpty.c
185
if ((*amaster = open("/dev/ptc", O_RDWR | O_NOCTTY)) == -1)
crypto/openssh/openbsd-compat/bsd-openpty.c
189
if ((*aslave = open(ttname, O_RDWR | O_NOCTTY)) == -1) {
crypto/openssh/openbsd-compat/bsd-openpty.c
212
if ((*amaster = open(ptbuf, O_RDWR | O_NOCTTY)) == -1) {
crypto/openssh/openbsd-compat/bsd-openpty.c
216
if ((*amaster = open(ptbuf, O_RDWR | O_NOCTTY)) == -1)
crypto/openssh/openbsd-compat/bsd-openpty.c
221
if ((*aslave = open(ttbuf, O_RDWR | O_NOCTTY)) == -1) {
crypto/openssh/openbsd-compat/bsd-openpty.c
87
if ((ptm = open("/dev/ptmx", O_RDWR | O_NOCTTY)) == -1)
crypto/openssh/openbsd-compat/daemon.c
71
if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) {
crypto/openssh/openbsd-compat/mktemp.c
105
fd = open(path, O_CREAT|O_EXCL|O_RDWR, S_IRUSR|S_IWUSR);
crypto/openssh/openbsd-compat/port-net.c
152
if ((fd = open(TUN_CTRL_DEV, O_RDWR)) == -1) {
crypto/openssh/openbsd-compat/port-net.c
234
fd = open(name, O_RDWR);
crypto/openssh/openbsd-compat/port-net.c
239
if ((fd = open(name, O_RDWR)) >= 0)
crypto/openssh/openbsd-compat/port-solaris.c
77
if ((tmpl_fd = open64(CT_TEMPLATE, O_RDWR)) == -1) {
crypto/openssh/openbsd-compat/readpassphrase.c
80
(input = output = open(_PATH_TTY, O_RDWR)) == -1) {
crypto/openssh/readpass.c
155
ttyfd = open(_PATH_TTY, O_RDWR);
crypto/openssh/regress/misc/fuzz-harness/agent_fuzz_helper.c
14
if ((fd = open("/dev/null", O_RDWR)) == -1) {
crypto/openssh/sftp-server.c
261
flags = O_RDWR;
crypto/openssh/ssh-keysign.c
192
if ((fd = open(_PATH_DEVNULL, O_RDWR)) < 2)
crypto/openssh/sshd-session.c
1006
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
crypto/openssh/sshd.c
1530
if ((devnull = open(_PATH_DEVNULL, O_RDWR)) == -1)
crypto/openssh/sshpty.c
106
fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
crypto/openssh/sshpty.c
119
fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
crypto/openssh/sshpty.c
134
fd = open(tty, O_RDWR);
crypto/openssh/sshpty.c
227
if ((fd = open(_PATH_TTY, O_RDWR | O_NOCTTY)) >= 0) {
crypto/openssl/crypto/mem_sec.c
523
if ((fd = open("/dev/zero", O_RDWR)) >= 0) {
crypto/openssl/crypto/s390xcap.c
223
OPENSSL_s390xcex = open("/dev/z90crypt", O_RDWR | O_CLOEXEC);
crypto/openssl/engines/e_devcrypto.c
1205
if ((fd = open("/dev/crypto", O_RDWR, 0)) < 0) {
lib/geom/virstor/geom_virstor.c
310
fd = open(name, O_RDWR);
lib/geom/virstor/geom_virstor.c
313
fd = open(param, O_RDWR);
lib/geom/virstor/geom_virstor.c
471
fd = open(name, O_RDWR);
lib/geom/virstor/geom_virstor.c
474
fd = open(param, O_RDWR);
lib/libc/db/btree/bt_open.c
189
case O_RDWR:
lib/libc/db/btree/bt_open.c
200
if ((flags & O_ACCMODE) != O_RDWR)
lib/libc/db/db/db.c
60
O_RDONLY | O_RDWR | O_SHLOCK | O_SYNC | O_TRUNC | O_CLOEXEC)
lib/libc/db/hash/hash.c
115
flags |= O_RDWR;
lib/libc/db/hash/hash.c
182
hashp->save_file = file && (flags & O_RDWR);
lib/libc/db/recno/rec_open.c
135
case O_RDWR:
lib/libc/db/recno/rec_open.c
80
O_RDWR, S_IRUSR | S_IWUSR, &btopeninfo, dflags);
lib/libc/db/recno/rec_open.c
82
dbp = __bt_open(NULL, O_RDWR, S_IRUSR | S_IWUSR, NULL, dflags);
lib/libc/db/test/btree.tests/main.c
166
db = dbopen(*argv == NULL ? NULL : *argv, O_RDWR,
lib/libc/db/test/btree.tests/main.c
169
db = dbopen(*argv == NULL ? NULL : *argv, O_CREAT|O_RDWR,
lib/libc/db/test/dbtest.c
90
oflags = O_CREAT | O_RDWR;
lib/libc/db/test/hash.tests/driver2.c
72
if (!(db = dbopen("bigtest", O_RDWR | O_CREAT, 0644, DB_HASH, &info))) {
lib/libc/db/test/hash.tests/tcreat3.c
63
O_CREAT|O_TRUNC|O_RDWR, 0600, DB_HASH, &ctl))){
lib/libc/db/test/hash.tests/tdel.c
65
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
lib/libc/db/test/hash.tests/thash4.c
67
if (!(dbp = dbopen( NULL, O_CREAT|O_RDWR, 0400, DB_HASH, &ctl))) {
lib/libc/gen/daemon.c
97
nullfd = _open(_PATH_DEVNULL, O_RDWR, 0);
lib/libc/gen/getpwent.c
1550
(*db = dbopen(NULL, O_RDWR, 600, DB_HASH, 0)) == NULL)
lib/libc/gen/memfd_create.c
81
oflags = O_RDWR;
lib/libc/gen/pututxline.c
183
fd = _open(_PATH_UTX_ACTIVE, O_CREAT|O_RDWR|O_TRUNC, 0644);
lib/libc/gen/pututxline.c
240
fd = _open(_PATH_UTX_LASTLOGIN, O_RDWR|O_CLOEXEC, 0644);
lib/libc/gen/pututxline.c
49
fd = _open(file, O_CREAT|O_RDWR|O_EXLOCK|O_CLOEXEC, 0644);
lib/libc/gen/readpassphrase.c
70
input = output = _open(_PATH_TTY, O_RDWR | O_CLOEXEC);
lib/libc/gen/sem_new.c
179
fd = _open(path, flags | O_RDWR | O_CLOEXEC |
lib/libc/gen/sem_new.c
211
fd = _open(path, flags | O_RDWR | O_CLOEXEC | O_EXLOCK, mode);
lib/libc/stdio/fdopen.c
71
if (tmp != O_RDWR && (tmp != (oflags & O_ACCMODE))) {
lib/libc/stdio/flags.c
86
m = O_RDWR;
lib/libc/stdio/fmemopen.c
79
if ((flags & O_ACCMODE) != O_RDWR && buf == NULL) {
lib/libc/stdio/freopen.c
92
if ((dflags & O_ACCMODE) != O_RDWR &&
lib/libc/stdio/mktemp.c
150
oflags |= O_CREAT | O_EXCL | O_RDWR;
lib/libc/tests/db/dbm_nextkey_test.c
33
db = dbm_open(path, O_RDWR | O_CREAT, 0755);
lib/libc/tests/db/dbm_perm_test.c
28
db = dbm_open(path, O_RDWR | O_CREAT, 0755);
lib/libc/tests/db/dbm_perm_test.c
83
db = dbm_open(path, O_RDWR, 0755);
lib/libc/tests/gen/glob2_test.c
58
fd = open(longname, O_CREAT | O_RDWR, 0666);
lib/libc/tests/gen/opendir_test.c
131
ATF_REQUIRE((fd = open("file", O_CREAT | O_RDWR, 0644)) >= 0);
lib/libc/tests/secure/fortify_poll_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_random_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_select_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_signal_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_socket_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_stdio_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_stdlib_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_string_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_strings_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_uio_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_unistd_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/secure/fortify_wchar_test.c
126
fd = open("tmpfile", O_RDWR | O_CREAT | O_TRUNC, 0644);
lib/libc/tests/stdio/fdopen_test.c
100
runtest(_PATH_DEVNULL, O_RDWR, "w", true);
lib/libc/tests/stdio/fdopen_test.c
121
runtest(_PATH_DEVNULL, O_RDWR, "a", true);
lib/libc/tests/stdio/fdopen_test.c
142
runtest(_PATH_DEVNULL, O_RDWR, "r+", true);
lib/libc/tests/stdio/fdopen_test.c
163
runtest(_PATH_DEVNULL, O_RDWR, "w+", true);
lib/libc/tests/stdio/fdopen_test.c
79
runtest(_PATH_DEVNULL, O_RDWR, "r", true);
lib/libc/tests/stdio/fopen_test.c
57
wantedflags = O_RDWR | (*mode == 'a' ? O_APPEND : 0);
lib/libc/tests/stdtime/detect_tz_changes_test.c
137
ATF_REQUIRE((fd = open(dfn, O_RDWR | O_CREAT, 0644)) >= 0);
lib/libc/tests/sys/sendfile_test.c
1023
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
1082
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
1106
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
1127
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
415
fd = shm_open(SHM_ANON, O_RDWR|O_CREAT, 0600);
lib/libc/tests/sys/sendfile_test.c
803
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libc/tests/sys/sendfile_test.c
862
fd = open(SOURCE_FILE, O_CREAT|O_RDWR, 0600);
lib/libcam/camlib.c
280
if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) {
lib/libcam/camlib.c
430
if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) {
lib/libcam/tests/libcam_test.c
189
ATF_REQUIRE(cam_open_device("/nonexistent", O_RDWR) == NULL);
lib/libcam/tests/libcam_test.c
212
ATF_CHECK(cam_open_device(cam_test_device, O_RDWR) == NULL);
lib/libcam/tests/libcam_test.c
232
cam_dev = cam_open_device(cam_test_device, O_RDWR);
lib/libcam/tests/libcam_test.c
273
cam_dev = cam_open_device(cam_test_device, O_RDWR);
lib/libcasper/libcasper/libcasper_impl.c
56
nullfd = open(_PATH_DEVNULL, O_RDWR);
lib/libcasper/libcasper/service.c
367
fd = open(_PATH_DEVNULL, O_RDWR);
lib/libcasper/services/cap_fileargs/tests/fileargs_test.c
390
fa = fileargs_init(MAX_FILES, files, O_RDWR | O_CREAT, 666,
lib/libcasper/services/cap_fileargs/tests/fileargs_test.c
398
ATF_REQUIRE(test_file_mode(fd, O_RDWR) == 0);
lib/libcasper/services/cap_fileargs/tests/fileargs_test.c
570
fa = fileargs_init(MAX_FILES, files, O_RDWR | O_CREAT, 0, &rights,
lib/libcasper/services/cap_fileargs/tests/fileargs_test.c
579
ATF_REQUIRE(test_file_mode(fd, O_RDWR) == 0);
lib/libcuse/cuse_lib.c
100
f_cuse = open("/dev/cuse", O_RDWR);
lib/libefivar/efivar.c
122
efi_fd = open("/dev/efi", O_RDWR);
lib/libgeom/geom_util.c
283
fd = open(devpath, dowrite ? O_RDWR : O_RDONLY);
lib/libgeom/geom_util.c
299
fd = open(path, dowrite ? O_RDWR : O_RDONLY);
lib/libkvm/kvm.c
133
if (flag & ~O_RDWR) {
lib/libmixer/mixer.c
93
if ((m->fd = open(m->name, O_RDWR)) < 0)
lib/libnetmap/nmport.c
202
fd = open(fname, O_RDWR);
lib/libnetmap/nmport.c
609
d->fd = open("/dev/netmap", O_RDWR);
lib/libnetmap/nmreq.c
215
fd = open("/dev/netmap", O_RDWR);
lib/libnvmf/nvmf_host.c
889
fd = open("/dev/nvmf", O_RDWR);
lib/libnvmf/nvmf_host.c
920
fd = open("/dev/nvmf", O_RDWR);
lib/libnvmf/nvmf_host.c
941
fd = open("/dev/nvmf", O_RDWR);
lib/libpam/modules/pam_exec/pam_exec.c
291
if ((chout[1] = open("/dev/null", O_RDWR)) < 0) {
lib/libpam/modules/pam_exec/pam_exec.c
306
if ((cherr[1] = open("/dev/null", O_RDWR)) < 0) {
lib/libpfctl/libpfctl.c
83
h->fd = open(pf_device, O_RDWR);
lib/libsysdecode/flags.c
291
case O_RDWR:
lib/libufs/type.c
196
fd = open(disk->d_name, O_RDWR);
lib/libusb/libusb20_ugen20.c
150
f = open(buf, O_RDWR);
lib/libusb/libusb20_ugen20.c
394
g = open(buf, O_RDWR);
lib/libusb/libusb20_ugen20.c
398
f = open(buf, O_RDWR);
lib/libutil/pty.c
53
master = posix_openpt(O_RDWR|O_NOCTTY);
lib/libutil/pty.c
67
slave = open(slavename, O_RDWR);
lib/libutil/quotafile.c
181
if ((qf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC, 0)) <
lib/libutil/quotafile.c
418
if ((qf->accmode & O_RDWR) != O_RDWR) {
lib/libutil/quotafile.c
466
if ((qf->accmode & O_RDWR) != O_RDWR) {
lib/libutil/quotafile.c
527
if ((qf->accmode & O_RDWR) != O_RDWR || qf->fd == -1) {
lib/libutil/quotafile.c
548
if ((newqf->fd = open(qf->qfname, O_RDWR|O_CREAT|O_TRUNC|O_CLOEXEC,
lib/libutil/tests/flopen_test.c
103
fd2 = flopen(fn, O_RDWR|O_NONBLOCK);
lib/libutil/tests/flopen_test.c
125
fd1 = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
131
fd2 = flopen(fn, O_RDWR|O_NONBLOCK);
lib/libutil/tests/flopen_test.c
157
fd1 = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
169
if ((fd2 = flopen(fn, O_RDWR|O_NONBLOCK)) != -1) {
lib/libutil/tests/flopen_test.c
52
fd = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
72
fd = open(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/tests/flopen_test.c
77
fd = flopen(fn, O_RDWR);
lib/libutil/tests/flopen_test.c
99
fd1 = flopen(fn, O_RDWR|O_CREAT, 0640);
lib/libutil/uucplock.c
132
if ((fd = open(lckname, O_RDWR | O_CLOEXEC)) < 0)
lib/libvmmapi/vmmapi.c
709
fd = open(pathname, O_RDWR);
lib/libvmmapi/vmmapi.c
91
return (open(devpath, O_RDWR));
lib/libvmmapi/vmmapi.c
99
return (open("/dev/vmmctl", O_RDWR, 0));
libexec/bootpd/bootpd.c
384
n = open(_PATH_TTY, O_RDWR);
libexec/bootpd/bootpgw/bootpgw.c
354
n = open(_PATH_TTY, O_RDWR);
libexec/bootpd/hwaddr.c
148
if ((fd=open("/dev/arp", O_RDWR)) < 0) {
libexec/getty/main.c
227
if (!opentty(ttyn, O_RDWR|O_NONBLOCK))
libexec/getty/main.c
265
if (!opentty(ttyn, O_RDWR | (NC ? O_NONBLOCK : 0 )))
libexec/rbootd/bpf.c
90
BpfFd = open(bpfdev, O_RDWR);
libexec/tftpd/tests/functional.c
1012
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1046
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1080
fd = open("unix.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1119
fd = open("small.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1146
fd = open("small.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
1177
fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
502
fd = open("small.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
520
fd = open("small.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
548
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
578
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
636
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
661
fd = open("medium.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
687
fd = open("unix.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
743
fd = open("small.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
768
fd = open("rfc7440.txt", O_RDWR | O_CREAT, 0644);
libexec/tftpd/tests/functional.c
873
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
908
fd = open("small.txt", O_RDWR | O_CREAT, 0666);
libexec/tftpd/tests/functional.c
945
fd = open("medium.txt", O_RDWR | O_CREAT, 0666);
libexec/ypxfr/yp_dbwrite.c
68
#define FLAGS O_RDWR|O_EXLOCK|O_EXCL|O_CREAT
libexec/ypxfr/ypxfrd_getmap.c
126
if ((fp = open(tmpname, O_RDWR|O_CREAT, PERM_SECURE)) == -1) {
sbin/bsdlabel/bsdlabel.c
393
fd = open(specname, O_RDWR);
sbin/camcontrol/camcontrol.c
10627
cam_open_btl(bus, target, lun, O_RDWR, NULL) :
sbin/camcontrol/camcontrol.c
10628
cam_open_spec_device(device,unit,O_RDWR,NULL)))
sbin/camcontrol/camcontrol.c
3545
if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) {
sbin/camcontrol/camcontrol.c
3685
if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) {
sbin/camcontrol/camcontrol.c
3885
if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) {
sbin/camcontrol/camcontrol.c
3892
device = cam_open_btl(bus, target, lun, O_RDWR, NULL);
sbin/camcontrol/camcontrol.c
481
if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) {
sbin/camcontrol/camcontrol.c
5143
if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) {
sbin/camcontrol/camcontrol.c
741
dev_result->target_lun, O_RDWR, NULL);
sbin/camcontrol/camcontrol.c
827
dev_result->target_lun, O_RDWR, NULL);
sbin/camcontrol/camcontrol.c
8802
item->dev_match.target_lun, O_RDWR, NULL);
sbin/camcontrol/camcontrol.c
8890
if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) {
sbin/camcontrol/fwdownload.c
785
if ((fd = open(XPT_DEVICE, O_RDWR)) < 0) {
sbin/dhclient/dhclient.c
483
if ((nullfd = open(_PATH_DEVNULL, O_RDWR, 0)) == -1)
sbin/fsck_msdosfs/check.c
62
dosfs = open(fname, rdonly ? O_RDONLY : O_RDWR, 0);
sbin/fsirand/fsirand.c
113
if ((devfd = open(device, printonly ? O_RDONLY : O_RDWR)) < 0) {
sbin/ggate/ggated/ggated.c
407
flags = O_RDWR;
sbin/ggate/ggatel/ggatel.c
76
int openflags = O_RDWR;
sbin/ggate/shared/ggate.c
177
g_gate_devfd = open("/dev/" G_GATE_CTL_NAME, O_RDWR);
sbin/growfs/growfs.c
1499
fso = open(_PATH_UFSSUSPEND, O_RDWR);
sbin/hastd/primary.c
914
res->hr_ggatefd = open("/dev/" G_GATE_CTL_NAME, O_RDWR);
sbin/hastd/subr.c
88
dowrite ? O_RDWR : O_RDONLY);
sbin/init/init.c
1199
if ((session_db = dbopen(NULL, O_RDWR, 0, DB_HASH, NULL)) == NULL) {
sbin/init/init.c
587
if ((fd = open(_PATH_CONSOLE, O_RDWR | O_NONBLOCK)) != -1) {
sbin/init/init.c
595
if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
sbin/ipf/ipf/ipf.c
183
if ((fd = open(ipfdev, O_RDWR)) == -1)
sbin/ipf/ipf/ipf.c
309
xfd = open(IPSTATE_NAME, O_RDWR);
sbin/ipf/ipf/ipf.c
326
xfd = open(IPNAT_NAME, O_RDWR);
sbin/ipf/ipfs/ipfs.c
103
fd = open(fname, O_RDWR);
sbin/ipf/ipfs/ipfs.c
167
fd = open(fname, O_RDWR);
sbin/ipf/ipfs/ipfs.c
340
if ((fd = open(ipfdev, O_RDWR)) == -1)
sbin/ipf/ipfsync/ipfsyncd.c
133
int fd = open("/dev/null", O_RDWR);
sbin/ipf/ipfsync/ipfsyncd.c
183
lfd = open(IPSYNC_NAME, O_RDWR);
sbin/ipf/ipmon/ipmon.c
1446
if ((fd = open(file, O_RDWR)) == -1) {
sbin/ipf/ipnat/ipnat.c
100
mode = O_RDWR;
sbin/ipf/ippool/ippool.c
406
fd = open(IPLOOKUP_NAME, O_RDWR);
sbin/ipf/ippool/ippool.c
469
fd = open(IPLOOKUP_NAME, O_RDWR);
sbin/ipf/ippool/ippool.c
579
fd = open(IPLOOKUP_NAME, O_RDWR);
sbin/ipf/ippool/ippool.c
731
fd = open(IPLOOKUP_NAME, O_RDWR);
sbin/ipf/ipscan/ipscan_y.y
547
fd = open(IPL_SCAN, O_RDWR);
sbin/ipf/ipsend/sbpf.c
60
if ((fd = open(bpfname, O_RDWR)) < 0)
sbin/ipf/ipsend/sbpf.c
72
if ((fd = open(bpfname, O_RDWR)) >= 0)
sbin/ipf/ipsend/sdlpi.c
72
if ((fd = open(devname, O_RDWR)) < 0)
sbin/ipf/ipsend/snit.c
63
if ((fd = open("/dev/nit", O_RDWR)) < 0)
sbin/ipf/libipf/poolio.c
26
poolfd = open(IPLOOKUP_NAME, O_RDWR);
sbin/ipfw/altq.c
56
pffd = open("/dev/pf", O_RDWR);
sbin/mdconfig/mdconfig.c
373
md_fd = open(_PATH_DEV MDCTL_NAME, O_RDWR, 0);
sbin/mdmfs/mdmfs.c
784
nfd = open(_PATH_DEVNULL, O_RDWR);
sbin/mount_fusefs/mount_fusefs.c
345
if ((fd = open(dev, O_RDWR)) < 0)
sbin/mount_fusefs/mount_fusefs.c
379
if (fd < 0 && (fd = open(dev, O_RDWR)) < 0)
sbin/newfs_msdos/mkfs_msdos.c
277
fd = open(fname, O_RDWR | O_CREAT | O_TRUNC, 0644);
sbin/newfs_msdos/mkfs_msdos.c
286
} else if ((fd = open(fname, o.no_create ? O_RDONLY : O_RDWR)) == -1) {
sbin/nos-tun/nos-tun.c
115
tun = open(dev_name, O_RDWR);
sbin/nvmecontrol/nvmecontrol.c
178
*fd = open(full_path, write ? O_RDWR : O_RDONLY);
sbin/pfctl/pfctl.c
3675
mode = O_RDWR;
sbin/pfctl/pfctl.c
3684
mode = O_RDWR;
sbin/pfctl/pfctl.c
3695
mode = O_RDWR;
sbin/pfctl/pfctl.c
3710
mode = O_RDWR;
sbin/pfctl/pfctl.c
3719
mode = O_RDWR;
sbin/pfctl/pfctl.c
3738
mode = O_RDWR;
sbin/pfctl/pfctl.c
3797
mode = O_RDWR;
sbin/pfctl/pfctl.c
3801
mode = O_RDWR;
sbin/pfctl/pfctl.c
3826
mode = strchr("st", ch) ? O_RDONLY : O_RDWR;
sbin/pfctl/pfctl.c
3845
if (mode == O_RDWR && tblcmdopt == NULL &&
sbin/pfilctl/pfilctl.c
82
dev = open("/dev/" PFILDEV, O_RDWR);
sbin/quotacheck/preen.c
110
qfu = quota_open(fs, USRQUOTA, O_CREAT|O_RDWR);
sbin/quotacheck/preen.c
113
qfg = quota_open(fs, GRPQUOTA, O_CREAT|O_RDWR);
sbin/quotacheck/quotacheck.c
199
qfu = quota_open(fs, USRQUOTA, O_CREAT|O_RDWR);
sbin/quotacheck/quotacheck.c
202
qfg = quota_open(fs, GRPQUOTA, O_CREAT|O_RDWR);
sbin/restore/dirs.c
143
fd = open(dirfile, O_RDWR|O_CREAT|O_EXCL, 0666);
sbin/restore/dirs.c
157
fd = open(modefile, O_RDWR|O_CREAT|O_EXCL, 0666);
sbin/routed/trace.c
189
fd = open(_PATH_DEVNULL, O_RDWR);
sbin/savecore/savecore.c
1397
capfa = fileargs_init(argc, argv, checkfor || keep ? O_RDONLY : O_RDWR,
sbin/swapon/swapon.c
682
nfd = open(_PATH_DEVNULL, O_RDWR);
sbin/umount/umount.c
691
fd = open(DEV_MDCTL, O_RDWR, 0);
share/examples/ipfilter/l4check/l4check.c
789
natfd = open(IPL_NAT, O_RDWR);
share/examples/ipfilter/samples/userauth.c
25
fd = open(IPL_NAME, O_RDWR);
share/examples/kld/cdev/test/testcdev.c
96
if ((kernel_fd = open("/dev/" CDEV_DEVICE, O_RDWR)) == -1) {
share/examples/perfmon/perfmon.c
112
fd = open(_PATH_PERFMON, O_RDWR, 0);
share/examples/ppi/ppilcd.c
322
if ((hd_fd = open(devname, O_RDWR, 0)) == -1)
share/examples/scsi_target/scsi_target.c
229
file_fd = open(file_name, O_RDWR);
share/examples/scsi_target/scsi_target.c
290
targ_fd = open("/dev/targ", O_RDWR);
share/examples/ses/srcs/chpmon.c
69
fd = open(v[dev], O_RDWR);
share/examples/ses/srcs/inienc.c
50
fd = open(*v, O_RDWR);
share/examples/ses/srcs/sesd.c
123
fd = open(v[dev], O_RDWR);
share/examples/ses/srcs/sesd.c
99
fd = open(v[dev], O_RDWR);
share/examples/ses/srcs/setencstat.c
55
fd = open(v[1], O_RDWR);
share/examples/ses/srcs/setobjstat.c
59
fd = open(v[1], O_RDWR);
share/examples/sound/kqueue.c
37
.mode = O_RDWR,
share/examples/sound/midi.c
50
if ((fd = open("/dev/umidi0.0", O_RDWR)) < 0)
share/examples/sound/oss.h
229
case O_RDWR:
share/examples/sound/poll.c
37
.mode = O_RDWR,
share/examples/sound/select.c
37
.mode = O_RDWR,
share/examples/sound/simple.c
111
.mode = O_RDWR,
stand/kboot/kboot/hostdisk.c
343
desc->d_unit = host_open(fn, O_RDWR, 0);
stand/liblua/lstd.c
62
m = O_RDWR;
stand/libsa/zfs/zfs.c
1478
pa.fd = open(devname, O_RDWR);
stand/libsa/zfs/zfs.c
768
pa.fd = open(devname, O_RDWR);
stand/usb/tools/sysinit.c
206
output_file = open(output_f, O_TRUNC | O_CREAT | O_RDWR, 0600);
stand/userboot/test/test.c
601
oflag = O_RDWR;
sys/cam/scsi/scsi_sa.c
750
softc->open_rdonly = (flags & O_RDWR) == O_RDONLY;
sys/compat/linux/linux_file.c
120
bsd_flags |= O_RDWR;
sys/compat/linux/linux_file.c
1389
if (result & O_RDWR)
sys/compat/linux/linux_file.c
1849
oflags = O_RDWR;
sys/dev/aic7xxx/aicasm/aicasm_symbol.c
135
O_CREAT | O_NONBLOCK | O_RDWR, /*mode*/0, DB_HASH,
sys/dev/filemon/filemon_wrapper.c
189
if (flags & O_RDWR) {
sys/fs/fuse/fuse_file.h
80
FUFH_RDWR = O_RDWR,
sys/fs/fuse/fuse_vnops.c
1141
flags = O_RDWR;
sys/fs/p9fs/p9fs_vnops.c
621
case O_RDWR:
sys/kern/kern_descrip.c
2919
UIO_SYSSPACE, O_RDWR, 0);
sys/kern/kern_umtx.c
4518
shm = shm_alloc(td->td_ucred, O_RDWR, false);
sys/kern/kern_umtx.c
4630
reg->ushm_obj, FFLAGS(O_RDWR));
sys/kern/kern_umtx.c
4634
FFLAGS(O_RDWR));
sys/kern/kern_umtx.c
4640
finit(fp, FFLAGS(O_RDWR), DTYPE_SHM, reg->ushm_obj,
sys/kern/tty_pts.c
841
if (uap->flags & ~(O_RDWR|O_NOCTTY|O_CLOEXEC))
sys/kern/uipc_shm.c
1158
if ((flags & O_ACCMODE) != O_RDONLY && (flags & O_ACCMODE) != O_RDWR)
sys/kern/uipc_shm.c
1328
(O_RDWR | O_TRUNC)) {
sys/kern/vfs_mountroot.c
599
O_RDWR, 0);
sys/kern/vfs_syscalls.c
1102
case O_RDWR:
sys/net/netmap_user.h
586
int fd = open(NETMAP_DEVICE_NAME, O_RDWR);
sys/net/netmap_user.h
851
d->fd = open(NETMAP_DEVICE_NAME, O_RDWR);
sys/opencrypto/cryptodev.c
1187
O_RDWR, 0);
sys/security/audit/audit_bsm_klib.c
216
oflags = oflags & (O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY);
sys/security/audit/audit_bsm_klib.c
232
oflags = oflags & (O_RDONLY | O_CREAT | O_TRUNC | O_RDWR | O_WRONLY);
sys/security/audit/audit_bsm_klib.c
70
{ O_RDWR, AUE_OPEN_RW },
sys/security/audit/audit_bsm_klib.c
71
{ (O_RDWR | O_CREAT), AUE_OPEN_RWC },
sys/security/audit/audit_bsm_klib.c
72
{ (O_RDWR | O_CREAT | O_TRUNC), AUE_OPEN_RWTC },
sys/security/audit/audit_bsm_klib.c
73
{ (O_RDWR | O_TRUNC), AUE_OPEN_RWT },
sys/security/audit/audit_bsm_klib.c
85
{ O_RDWR, AUE_OPENAT_RW },
sys/security/audit/audit_bsm_klib.c
86
{ (O_RDWR | O_CREAT), AUE_OPENAT_RWC },
sys/security/audit/audit_bsm_klib.c
87
{ (O_RDWR | O_CREAT | O_TRUNC), AUE_OPENAT_RWTC },
sys/security/audit/audit_bsm_klib.c
88
{ (O_RDWR | O_TRUNC), AUE_OPENAT_RWT },
tests/sys/aio/aio_kqueue_test.c
95
fd = open(file, O_RDWR|O_CREAT, 0666);
tests/sys/aio/aio_test.c
1010
fd = open(devname, O_RDWR);
tests/sys/aio/aio_test.c
1065
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1471
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1514
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1602
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1639
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1713
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1735
fd = open("testfile", O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
1765
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
457
fd = open(FILE_PATHNAME, O_RDWR | O_CREAT, 0600);
tests/sys/aio/aio_test.c
790
mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0);
tests/sys/aio/aio_test.c
815
fd = open(pathname, O_RDWR);
tests/sys/aio/aio_test.c
829
mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0);
tests/sys/aio/aio_test.c
987
fd = open(vdev_name, O_RDWR | O_CREAT, 0600);
tests/sys/aio/lio_kqueue_test.c
90
fd = open(file, O_RDWR|O_CREAT, 0666);
tests/sys/aio/lio_test.c
222
fd = open("testfile", O_CREAT | O_RDWR, 0666);
tests/sys/aio/lio_test.c
301
fd = open("testfile", O_CREAT | O_RDWR, 0666);
tests/sys/aio/lio_test.c
80
fd = open(path, O_RDWR|O_CREAT, 0666);
tests/sys/audit/administrative.c
396
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-attribute-access.c
155
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-attribute-access.c
292
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-attribute-access.c
440
ATF_REQUIRE((fhdesc = fhopen(&fht, O_RDWR)) != -1);
tests/sys/audit/file-close.c
106
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR, mode)) != -1);
tests/sys/audit/file-close.c
184
ATF_REQUIRE((filedesc = posix_openpt(O_RDWR | O_NOCTTY)) != -1);
tests/sys/audit/file-write.c
96
ATF_REQUIRE((filedesc = open(path, O_CREAT | O_RDWR)) != -1);
tests/sys/audit/inter-process.c
1413
ATF_REQUIRE(shm_open(SHM_ANON, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1);
tests/sys/audit/inter-process.c
1435
ATF_REQUIRE_EQ(-1, shm_open(path, O_TRUNC | O_RDWR, 0600));
tests/sys/audit/inter-process.c
1458
ATF_REQUIRE(shm_open(dirpath, O_CREAT | O_TRUNC | O_RDWR, 0600) != -1);
tests/sys/audit/inter-process.c
1553
ATF_REQUIRE((filedesc = posix_openpt(O_RDWR | O_NOCTTY)) != -1);
tests/sys/audit/open.c
169
OPEN_AT_TC_DEFINE(read_write, "read,write", O_RDWR, "fr")
tests/sys/audit/open.c
170
OPEN_AT_TC_DEFINE(read_write_creat, "read,write,creat", O_RDWR | O_CREAT, "fw")
tests/sys/audit/open.c
171
OPEN_AT_TC_DEFINE(read_write_trunc, "read,write,trunc", O_RDWR | O_TRUNC, "fr")
tests/sys/audit/open.c
172
OPEN_AT_TC_DEFINE(read_write_creat_trunc, "read,write,creat,trunc", O_RDWR |
tests/sys/cam/ctl/prout_register_huge_cdb.c
51
int fd = open("/dev/cam/ctl", O_RDWR);
tests/sys/capsicum/capability-fd-pair.cc
11
int in_fd = open(TmpFile("cap_sendfile_in"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/capability-fd.cc
1006
int fd = open(TmpFile("cap_fd_transfer"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
293
int fd = open(TmpFile("cap_file_sync"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
412
int fd = open(TmpFile("cap_mmap_operations"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
579
int fd = open(TmpFile("cap_fd_operations"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/capability-fd.cc
660
rc = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR | O_APPEND, 0600);
tests/sys/capsicum/capability-fd.cc
687
rc = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR | O_APPEND);
tests/sys/capsicum/capability-fd.cc
702
rc = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR | O_APPEND);
tests/sys/capsicum/capability-fd.cc
722
rc = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDWR);
tests/sys/capsicum/capability-fd.cc
735
rc = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR, 0600);
tests/sys/capsicum/capability-fd.cc
751
rc = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR);
tests/sys/capsicum/capability-fd.cc
763
rc = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR);
tests/sys/capsicum/capmode.cc
31
fd_file_(open(TmpFile("cap_capmode"), O_RDWR|O_CREAT, 0644)),
tests/sys/capsicum/capmode.cc
32
fd_close_(open("/dev/null", O_RDWR)),
tests/sys/capsicum/capmode.cc
581
EXPECT_CAPMODE(open("/dev/null", O_RDWR));
tests/sys/capsicum/capmode.cc
612
int fd = open("/dev/null", O_RDWR);
tests/sys/capsicum/capmode.cc
647
EXPECT_CAPMODE(open("/dev/null", O_RDWR));
tests/sys/capsicum/capmode.cc
83
EXPECT_CAPMODE(open("/dev/null", O_RDWR));
tests/sys/capsicum/copy_file_range.cc
43
int fd = open(filename, O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/fcntl.cc
149
int fd = open(TmpFile("cap_fcntl_cmds"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
208
int fd = open(TmpFile("cap_fcntl_readlock"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
255
int fd = open(TmpFile("cap_fcntl_subrightnorm"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
282
int fd = open(TmpFile("cap_fcntl_subrightpreserve"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
315
int fd = open(TmpFile("cap_fcntl_subrights"), O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/fcntl.cc
36
files["SHM"] = shm_open(shm_name, (O_CREAT|O_RDWR), 0600);
tests/sys/capsicum/fexecve.cc
65
int fd = open(temp_script_filename_, O_RDWR|O_CREAT, 0755);
tests/sys/capsicum/linux.cc
1076
int fd = open(TmpFile("cap_bpf_capmode"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
1114
int fd = open(TmpFile("cap_aio"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
1291
int fd_all = open(TmpFile("cap_lease"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
1366
int fd = openat(dir, "cap_openbyhandle_testfile", O_RDWR|O_CREAT, 0644);
tests/sys/capsicum/linux.cc
331
int fd = open(TmpFile("cap_fstatat"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
376
int fa_fd = fanotify_init(FAN_CLASS_NOTIF, O_RDWR);
tests/sys/capsicum/linux.cc
417
int fd = open(TmpFile("cap_notify/file"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
456
int fd = open(TmpFile("cap_notify/temp"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/linux.cc
551
int fd = open(TmpFile("cap_inotify"), O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/mqueue.cc
32
int mq = mq_open_("/cap_mq", O_RDWR|O_CREAT, 0644, NULL);
tests/sys/capsicum/mqueue.cc
63
EXPECT_CAPMODE(mq_open_("/cap_mw", O_RDWR|O_CREAT, 0644, NULL));
tests/sys/capsicum/openat.cc
21
int fd = open(filename, O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/rename.cc
20
int src_fd = open(src_path, O_CREAT|O_RDWR, 0644);
tests/sys/capsicum/select.cc
31
int fd = open(TmpFile("cap_select"), O_RDWR | O_CREAT, 0644);
tests/sys/capsicum/select.cc
98
int fd = open(TmpFile("cap_poll"), O_RDWR | O_CREAT, 0644);
tests/sys/cddl/zfs/bin/file_trunc.c
80
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/sys/cddl/zfs/bin/file_write.c
152
oflag = (O_RDWR|O_CREAT);
tests/sys/cddl/zfs/bin/file_write.c
154
oflag = (O_RDWR|O_APPEND);
tests/sys/cddl/zfs/bin/largest_file.c
69
fd = open(testfile, O_CREAT | O_RDWR);
tests/sys/cddl/zfs/bin/mktree.c
167
if ((fd = open(pname, O_CREAT|O_RDWR, 0777)) < 0) {
tests/sys/cddl/zfs/bin/mktree.c
179
if ((afd = openat(fd, "xattr", O_CREAT | O_RDWR | O_XATTR, 0777)) < 0) {
tests/sys/cddl/zfs/bin/mmapwrite.c
79
if ((fd = open(argv[1], O_RDWR|O_CREAT|O_TRUNC, 0666)) == -1) {
tests/sys/cddl/zfs/bin/randfree_file.c
79
if ((fd = open(filename, O_RDWR|O_CREAT|O_TRUNC)) < 0) {
tests/sys/cddl/zfs/bin/readmmap.c
76
fd = open(filename, O_RDWR|O_CREAT|O_TRUNC, 0666);
tests/sys/cddl/zfs/bin/rm_lnkcnt_zero_file.c
118
fd = open(filebase, O_APPEND | O_RDWR | O_CREAT, 0644);
tests/sys/cddl/zfs/bin/rm_lnkcnt_zero_file.c
97
*fd = open(filebase, O_APPEND | O_RDWR | O_CREAT, 0644);
tests/sys/cddl/zfs/tests/threadsappend/threadsappend.c
107
outfd = open(argv[optind++], O_RDWR|O_CREAT|O_APPEND|O_TRUNC, 0777);
tests/sys/cddl/zfs/tests/txg_integrity/fsync_integrity.c
435
outfd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity.c
500
outfd = open(argv[1], O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/fifo/fifo_io.c
159
fd = open(fifoname, O_RDWR);
tests/sys/file/fcntlflags_test.c
90
basic_tests("/dev/null", O_RDWR, "O_RDWR");
tests/sys/file/flock_helper.c
80
fd = open(pathname, O_RDWR);
tests/sys/file/fspacectl_test.c
197
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
222
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
246
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
270
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
295
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/fspacectl_test.c
320
O_CREAT | O_RDWR | O_TRUNC, 0600)) != -1);
tests/sys/file/ftruncate_test.c
76
fd = open(path, O_RDWR|O_CREAT, 0600);
tests/sys/file/path_test.c
255
fd = openat(pathfd, "", O_RDWR | O_EMPTY_PATH);
tests/sys/file/path_test.c
261
fd = openat(pathfd, "", O_RDWR | O_EMPTY_PATH | O_APPEND);
tests/sys/file/path_test.c
270
fd = openat(pathfd, "", O_RDWR | O_EMPTY_PATH);
tests/sys/file/path_test.c
345
fd = openat(pathfd, "test", O_RDWR | O_CREAT, 0600);
tests/sys/file/path_test.c
356
openat(pathfd, "test2", O_RDWR | O_CREAT, 0600) < 0);
tests/sys/file/path_test.c
384
openat(pathfd, "test2", O_RDWR | O_CREAT, 0600) < 0);
tests/sys/file/path_test.c
724
fd = open(path2, O_RDWR);
tests/sys/fs/fusefs/bmap.cc
101
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/bmap.cc
147
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/bmap.cc
205
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/bmap.cc
255
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/bmap.cc
346
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/copy_file_range.cc
240
fd2 = open(FULLPATH2, O_RDWR);
tests/sys/fs/fusefs/copy_file_range.cc
371
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/copy_file_range.cc
567
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/copy_file_range.cc
677
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/default_permissions.cc
1059
fd = open(FULLPATH, O_CREAT | O_RDWR, 0);
tests/sys/fs/fusefs/default_permissions.cc
1358
fd = open(FULLPATH, O_CREAT | O_RDWR, 0);
tests/sys/fs/fusefs/default_permissions.cc
928
fd = open(FULLPATH, O_CREAT | O_RDWR, 0);
tests/sys/fs/fusefs/default_permissions.cc
959
EXPECT_EQ(-1, open(FULLPATH, O_RDWR));
tests/sys/fs/fusefs/fallocate.cc
198
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
243
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
294
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
353
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
380
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
421
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
449
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
482
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
522
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
571
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
608
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
637
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
677
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
715
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
753
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fallocate.cc
774
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fifo.cc
97
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/flush.cc
257
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fsync.cc
109
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fsync.cc
158
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fsync.cc
178
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fsync.cc
206
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fsync.cc
231
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/fsync.cc
253
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/io.cc
226
m_test_fd = open(FULLPATH, O_RDWR );
tests/sys/fs/fusefs/io.cc
245
m_test_fd = open("backing_file", O_RDWR);
tests/sys/fs/fusefs/io.cc
249
m_control_fd = open("control", O_RDWR);
tests/sys/fs/fusefs/io.cc
90
m_backing_fd = open("backing_file", O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/fs/fusefs/io.cc
93
m_control_fd = open("control", O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/fs/fusefs/last_local_modify.cc
115
fd = open("mountpoint/some_file.txt", O_RDWR);
tests/sys/fs/fusefs/last_local_modify.cc
137
fd = open("mountpoint/some_file.txt", O_RDWR);
tests/sys/fs/fusefs/last_local_modify.cc
157
fd = open("mountpoint/some_file.txt", O_RDWR);
tests/sys/fs/fusefs/last_local_modify.cc
185
fd = open("mountpoint/some_file.txt", O_RDWR | O_DIRECT);
tests/sys/fs/fusefs/locks.cc
144
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
165
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
184
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
203
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
225
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
275
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
338
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
395
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
460
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
501
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
527
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
553
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
579
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
605
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
634
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
662
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
690
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/locks.cc
720
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/mockfs.cc
466
m_fuse_fd = open("/dev/fuse", O_CLOEXEC | O_RDWR);
tests/sys/fs/fusefs/mockfs.cc
469
m_fuse_fd = open("/dev/fuse", O_CLOEXEC | O_RDWR | O_NONBLOCK);
tests/sys/fs/fusefs/notify.cc
367
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/notify.cc
455
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/notify.cc
492
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/notify.cc
554
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/notify.cc
593
fuse_fd = open("/dev/fuse", O_CLOEXEC | O_RDWR);
tests/sys/fs/fusefs/open.cc
272
test_ok(O_RDWR, O_RDWR);
tests/sys/fs/fusefs/read.cc
1680
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/read.cc
951
fd1 = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/read.cc
986
fd1 = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/release.cc
140
expect_release(ino, getpid(), O_RDWR | O_APPEND, 0);
tests/sys/fs/fusefs/release.cc
142
fd = open(FULLPATH, O_RDWR | O_APPEND);
tests/sys/fs/fusefs/release.cc
276
expect_release(ino, static_cast<uint64_t>(pid), O_RDWR, 0);
tests/sys/fs/fusefs/release.cc
278
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/setattr.cc
391
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/setattr.cc
475
expect_open(ino, O_RDWR, 1);
tests/sys/fs/fusefs/setattr.cc
534
fd = open(FULLPATH, O_RDWR, 0644);
tests/sys/fs/fusefs/unlink.cc
226
fd = open(FULLPATH0, O_RDWR);
tests/sys/fs/fusefs/utils.cc
389
in.body.read.flags == O_RDWR)
tests/sys/fs/fusefs/utils.cc
513
in.body.write.flags == O_RDWR) &&
tests/sys/fs/fusefs/write.cc
1032
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1089
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1123
fd = open(FULLPATH, O_RDWR | O_DIRECT);
tests/sys/fs/fusefs/write.cc
1150
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1190
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1226
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1260
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1309
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1382
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1446
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1523
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1562
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1599
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1626
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
1654
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
294
fd = open(FULLPATH, O_RDWR | O_APPEND);
tests/sys/fs/fusefs/write.cc
325
fd = open(FULLPATH, O_RDWR | O_APPEND);
tests/sys/fs/fusefs/write.cc
377
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
640
expect_read(ino, 0, orig_fsize, truncated_fsize, INITIAL, O_RDWR);
tests/sys/fs/fusefs/write.cc
643
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
718
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
764
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
818
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
953
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/fusefs/write.cc
988
fd = open(FULLPATH, O_RDWR);
tests/sys/fs/tarfs/mktar.c
73
if ((fd = open(filename, O_RDWR|O_CREAT|O_EXCL, mode)) < 0)
tests/sys/fs/tarfs/mktar.c
92
if ((fd = open(filename, O_RDWR|O_CREAT|O_EXCL, mode)) < 0)
tests/sys/geom/class/eli/unaligned_io.c
62
fd = open(disk, O_RDWR);
tests/sys/kern/copy_file_range.c
129
fd2 = open("copy", O_RDWR | O_CREAT, 0644);
tests/sys/kern/getdirentries_test.c
157
ATF_REQUIRE((fd = open("file", O_CREAT | O_RDWR, 0644)) >= 0);
tests/sys/kern/inotify_test.c
273
fd = open(file, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
276
fd = open(file, O_RDWR);
tests/sys/kern/inotify_test.c
353
fd = openat(dfd, "file", O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
372
fd = openat(dfd, "file2", O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
423
fd = openat(dfd, name, O_CREAT | O_RDWR, 0644);
tests/sys/kern/inotify_test.c
458
fd = open(path, O_RDWR);
tests/sys/kern/inotify_test.c
471
fd1 = open("sink", O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
546
fd = open(path, O_RDWR);
tests/sys/kern/inotify_test.c
600
fd = open(path, O_RDWR);
tests/sys/kern/inotify_test.c
624
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
689
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
700
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
706
fd = open(file, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
739
fd = open(path1, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
805
fd = open(path, O_RDWR | O_CREAT, 0644);
tests/sys/kern/inotify_test.c
823
fd = open(path, O_RDWR);
tests/sys/kern/kcov.c
63
fd = open("/dev/kcov", O_RDWR);
tests/sys/kern/ktrace_test.c
521
CHILD_REQUIRE(shm_open("/ktrace_shm", O_RDWR | O_CREAT,
tests/sys/kern/socket_msg_trunc.c
180
fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644);
tests/sys/mqueue/mqtest1.c
21
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest2.c
35
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest2.c
51
mq = mq_open(MQNAME, O_RDWR);
tests/sys/mqueue/mqtest3.c
37
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest3.c
54
mq = mq_open(MQNAME, O_RDWR);
tests/sys/mqueue/mqtest4.c
38
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest4.c
52
mq = mq_open(MQNAME, O_RDWR);
tests/sys/mqueue/mqtest5.c
48
mq = mq_open(MQNAME, O_CREAT | O_RDWR | O_EXCL, 0666, &attr);
tests/sys/mqueue/mqtest5.c
67
mq = mq_open(MQNAME, O_RDWR | O_NONBLOCK);
tests/sys/net/routing/rtsock_common.h
192
int fd = open(path, O_RDWR|O_EXCL);
tests/sys/net/transient_tuntap.c
33
tunfd = open(tundev, O_RDWR);
tests/sys/netinet/ip_reass_test.c
145
fd = open("/dev/bpf0", O_RDWR);
tests/sys/netinet/udp_dontroute.c
81
t = open(tapdev, O_RDWR | O_NONBLOCK);
tests/sys/netmap/ctrl-api-test.c
2306
fd = open("/dev/netmap", O_RDWR);
tests/sys/netpfil/pf/ioctl/validation.c
44
dev = open("/dev/pf", O_RDWR); \
tests/sys/opencrypto/blake2_test.c
91
fd = open("/dev/crypto", O_RDWR);
tests/sys/opencrypto/poly1305_test.c
305
fd = open("/dev/crypto", O_RDWR);
tests/sys/posixshm/posixshm_test.c
1003
fd = shm_open(SHM_ANON, O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
1009
fd = shm_open(test_path, O_CREAT | O_RDWR, 0600);
tests/sys/posixshm/posixshm_test.c
1026
fd = shm_open(test_path, O_CREAT | O_RDWR, 0600);
tests/sys/posixshm/posixshm_test.c
1033
fd = shm_open(test_path, O_CREAT | O_RDWR, 0660);
tests/sys/posixshm/posixshm_test.c
1040
fd = shm_open(test_path, O_CREAT | O_RDWR, 0666);
tests/sys/posixshm/posixshm_test.c
1061
fd = shm_open(SHM_ANON, O_RDWR, 0666);
tests/sys/posixshm/posixshm_test.c
1099
fd = shm_open("/testtest", O_RDWR | O_CREAT, 0666);
tests/sys/posixshm/posixshm_test.c
1175
fd = shm_open("/testtest1", O_RDWR | O_CREAT, 0666);
tests/sys/posixshm/posixshm_test.c
1227
fd = shm_create_largepage(SHM_ANON, O_CREAT | O_RDWR, psind, policy, 0);
tests/sys/posixshm/posixshm_test.c
126
fd = shm_open(path, O_CREAT|O_EXCL|O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
130
fd = shm_open(test_path, O_CREAT | O_EXCL | O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
1310
fd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0);
tests/sys/posixshm/posixshm_test.c
1329
fd = __sys_shm_open2(SHM_ANON, O_CREAT | O_RDWR, 0, SHM_LARGEPAGE,
tests/sys/posixshm/posixshm_test.c
1903
fd = shm_create_largepage(test_path, O_CREAT | O_RDWR, psind,
tests/sys/posixshm/posixshm_test.c
1914
fd = shm_open(test_path, O_RDWR, 0);
tests/sys/posixshm/posixshm_test.c
638
fd = shm_open(SHM_ANON, O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
703
fd = shm_open(test_path, O_RDWR | O_CREAT, 0777);
tests/sys/posixshm/posixshm_test.c
713
fd = shm_open(test_path, O_RDWR | O_TRUNC, 0777);
tests/sys/posixshm/posixshm_test.c
754
fd = shm_open(SHM_ANON, O_CREAT|O_RDWR, 0777);
tests/sys/posixshm/posixshm_test.c
923
desc = shm_open(test_path, O_EXCL | O_CREAT | O_RDWR, 0600);
tests/sys/ses/destructive.c
282
for_each_ses_dev(do_setencstat, O_RDWR);
tests/sys/ses/destructive.c
286
for_each_ses_dev(do_setencstat_cleanup, O_RDWR);
tests/sys/ses/destructive.c
59
fd = open(g.gl_pathv[0], O_RDWR);
tests/sys/ses/nondestructive.c
647
for_each_ses_dev(do_getstring, O_RDWR);
tests/sys/sound/polling.c
48
fd = open("/dev/dsp.dummy", O_RDWR);
tests/sys/sound/sndstat.c
230
if ((fd = open("/dev/sndstat", O_RDWR)) < 0)
tests/sys/vm/mlock_test.c
203
shmfd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
tests/sys/vm/mmap_test.c
141
ATF_REQUIRE((shmfd = shm_open(SHM_ANON, O_RDWR, 0644)) >= 0);
tests/sys/vm/mmap_test.c
251
ATF_REQUIRE((fd = open("/dev/zero", O_RDWR)) >= 0);
tests/sys/vm/mmap_test.c
330
fd = shm_open(SHM_ANON, O_RDWR, 0644);
tests/sys/vm/page_fault_signal.c
130
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
tests/sys/vm/page_fault_signal.c
153
fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, 0600);
tools/bus_space/bus.c
112
r->fd = open(path, O_RDWR);
tools/bus_space/busdma.c
194
fd = open(path, O_RDWR);
tools/regression/aio/aiop/aiop.c
173
fd = open(fn, O_RDWR | O_DIRECT);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
105
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
109
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
113
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
294
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
296
CHECK(fcntl(fd, F_GETFL) == (O_RDWR | O_NONBLOCK));
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
298
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
318
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
320
CHECK(fcntl(fd, F_GETFL) == (O_RDWR | O_NONBLOCK));
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
322
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
348
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
352
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
356
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
58
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
60
CHECK(fcntl(fd, F_GETFL) == (O_RDWR | O_NONBLOCK));
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
62
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
82
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
84
CHECK(fcntl(fd, F_GETFL) == (O_RDWR | O_NONBLOCK));
tools/regression/capsicum/syscalls/cap_fcntls_limit.c
86
CHECK(fcntl(fd, F_GETFL) == O_RDWR);
tools/regression/fsx/fsx.c
1156
fd = open(fname, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 0666);
tools/regression/fsx/fsx.c
1163
fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
tools/regression/fsx/fsx.c
777
fd = open(fname, O_RDWR, 0);
tools/regression/geom/MdLoad/MdLoad.c
254
fd = open(argv[1], O_RDWR);
tools/regression/geom/MdLoad/MdLoad.c
257
fd = open(buf, O_RDWR);
tools/regression/nfsmmap/test1/test1.c
17
fd = open("test1.data", O_RDWR|O_CREAT, 0666);
tools/regression/nfsmmap/test1/test1.c
25
fd = open("test1.data", O_RDWR);
tools/regression/nfsmmap/test1/test1.c
40
fd2 = open("test1.scratch", O_RDWR|O_CREAT, 0666);
tools/regression/nfsmmap/test2/test2.c
17
fd = open("test2.data", O_RDWR|O_CREAT, 0666);
tools/regression/nfsmmap/test2/test2.c
25
fd = open("test2.data", O_RDWR);
tools/regression/nfsmmap/test2/test2.c
38
fd2 = open("test2.scratch", O_RDWR|O_CREAT, 0666);
tools/regression/priv/priv_vfs_clearsugid.c
131
fd = open(fpath, O_RDWR);
tools/regression/priv/priv_vfs_read_write.c
147
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
154
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
161
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
168
asroot, injail, O_RDWR, 0, 0);
tools/regression/priv/priv_vfs_read_write.c
180
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
187
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
194
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
201
asroot, injail, O_RDWR, 0, 0);
tools/regression/priv/priv_vfs_read_write.c
213
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
220
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
227
asroot, injail, O_RDWR, asroot ? 0 : -1, EACCES);
tools/regression/priv/priv_vfs_read_write.c
234
asroot, injail, O_RDWR, 0, 0);
tools/regression/security/cap_test/cap_test_capabilities.c
195
ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR | O_APPEND, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
196
CHECK_RESULT(openat(O_CREATE | O_RDWR | O_APPEND),
tools/regression/security/cap_test/cap_test_capabilities.c
215
ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR | O_APPEND);
tools/regression/security/cap_test/cap_test_capabilities.c
216
CHECK_RESULT(openat(O_FSYNC | O_RDWR | O_APPEND),
tools/regression/security/cap_test/cap_test_capabilities.c
227
ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR | O_APPEND);
tools/regression/security/cap_test/cap_test_capabilities.c
228
CHECK_RESULT(openat(O_SYNC | O_RDWR | O_APPEND),
tools/regression/security/cap_test/cap_test_capabilities.c
247
ret = openat(dfd_cap, "cap_ftruncate", O_TRUNC | O_RDWR);
tools/regression/security/cap_test/cap_test_capabilities.c
248
CHECK_RESULT(openat(O_TRUNC | O_RDWR),
tools/regression/security/cap_test/cap_test_capabilities.c
258
ret = openat(dfd_cap, "cap_create", O_CREAT | O_RDWR, 0600);
tools/regression/security/cap_test/cap_test_capabilities.c
259
CHECK_RESULT(openat(O_CREATE | O_RDWR),
tools/regression/security/cap_test/cap_test_capabilities.c
272
ret = openat(dfd_cap, "cap_fsync", O_FSYNC | O_RDWR);
tools/regression/security/cap_test/cap_test_capabilities.c
273
CHECK_RESULT(openat(O_FSYNC | O_RDWR),
tools/regression/security/cap_test/cap_test_capabilities.c
280
ret = openat(dfd_cap, "cap_fsync", O_SYNC | O_RDWR);
tools/regression/security/cap_test/cap_test_capabilities.c
281
CHECK_RESULT(openat(O_SYNC | O_RDWR),
tools/regression/security/cap_test/cap_test_capmode.c
72
REQUIRE(fd_file = open("/tmp/cap_capmode", O_RDWR|O_CREAT, 0644));
tools/regression/security/cap_test/cap_test_capmode.c
73
REQUIRE(fd_close = open("/dev/null", O_RDWR));
tools/regression/security/cap_test/cap_test_capmode.c
99
CHECK_CAPMODE(open, "/dev/null", O_RDWR);
tools/regression/security/cap_test/cap_test_fcntl.c
72
{ "SHM", shm_open(SHM_ANON, O_RDWR, 0600) },
tools/regression/security/open_to_operation/open_to_operation.c
1001
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
1043
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
1053
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
117
static const int file_modes[] = { O_RDONLY, O_WRONLY, O_RDWR,
tools/regression/security/open_to_operation/open_to_operation.c
118
O_RDONLY | O_TRUNC, O_WRONLY | O_TRUNC, O_RDWR | O_TRUNC };
tools/regression/security/open_to_operation/open_to_operation.c
508
((mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
523
((mode & O_ACCMODE) == O_RDWR)) {
tools/regression/security/open_to_operation/open_to_operation.c
539
((mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
552
((mode & O_ACCMODE) == O_RDWR)) {
tools/regression/security/open_to_operation/open_to_operation.c
566
((mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
574
((mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
699
((mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
707
((mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
790
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
796
(mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
874
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
880
(mode & O_ACCMODE) == O_RDWR))
tools/regression/security/open_to_operation/open_to_operation.c
913
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
923
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
959
(mode & O_ACCMODE) == O_RDWR)
tools/regression/security/open_to_operation/open_to_operation.c
966
(mode & O_ACCMODE) == O_RDWR)
tools/regression/sockets/sendfile/sendfile.c
470
file_fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/regression/ufs/uprintf/ufs_uprintf.c
138
fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/regression/ufs/uprintf/ufs_uprintf.c
151
fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/regression/ufs/uprintf/ufs_uprintf.c
72
fd = open(BLOCKS_FILENAME, O_CREAT | O_TRUNC | O_RDWR, 0600);
tools/test/stress2/lib/resources.c
185
if ((dffd = open(dfpath, O_RDWR, 0644)) == -1) {
tools/test/stress2/lib/resources.c
217
if ((dffd = open(dfpath, O_RDWR, 0644)) == -1) {
tools/test/stress2/testcases/lockf/lockf.c
139
if ((fd = open(file,O_CREAT | O_TRUNC | O_RDWR, 0600)) == -1) {
tools/test/stress2/testcases/lockf2/lockf2.c
107
if ((fd = open(file, O_RDWR, 0600)) == -1)
tools/test/stress2/testcases/lockf2/lockf2.c
84
if ((fd = open(file,O_CREAT | O_TRUNC | O_RDWR, 0600)) == -1)
tools/test/stress2/testcases/mmap/mmap.c
112
if ((fdout = open(file, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0)
tools/test/stress2/tools/bench.c
106
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
135
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
168
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
200
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
240
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/bench.c
75
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC,
tools/test/stress2/tools/flip.c
116
if ((fd = open(argv[0], O_RDWR)) == -1)
tools/test/stress2/tools/serial.c
25
if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0)
tools/test/stress2/tools/zapsb.c
44
if ((fd = open(fs, O_RDWR, 0)) < 0)
tools/test/upsdl/upsdl.c
54
fd = open(filename,O_CREAT | O_TRUNC | O_RDWR,S_IRWXU);
tools/tools/aac/aac_checkq.c
61
fd = open("/dev/aac0", O_RDWR);
tools/tools/bhyve/fwctl_fetch.c
124
if (open("/dev/io", O_RDWR) == -1)
tools/tools/crypto/cryptocheck.c
338
fd = open("/dev/crypto", O_RDWR | O_CLOEXEC, 0);
tools/tools/cxgbtool/cxgbtool.c
134
if ((fd = open(buf, O_RDWR)) < 0)
tools/tools/ioat/ioatcontrol.c
234
fd = open("/dev/ioat_test", O_RDWR);
tools/tools/ioat/ioatcontrol.c
94
fd = open("/dev/ioat_test", O_RDWR);
tools/tools/iwn/iwnstats/main.c
65
is->s = open(buf, O_RDWR);
tools/tools/kttcp/kttcp.c
193
if ((kfd = open(KTTCP_DEVICE, O_RDWR, 666)) == -1)
tools/tools/mfi/mfi_checkq.c
58
fd = open("/dev/mfi0", O_RDWR);
tools/tools/net80211/stumbler/stumbler.c
310
fd = open(buf, O_RDWR);
tools/tools/net80211/w00t/libw00t/w00t.c
249
return open(buf, O_RDWR);
tools/tools/net80211/w00t/libw00t/w00t.c
96
fd = open(buf, O_RDWR);
tools/tools/net80211/wesside/wesside/wesside.c
2164
tapfd = open(TAP_DEV, O_RDWR);
tools/tools/net80211/wesside/wesside/wesside.c
427
fd = open(buf, O_RDWR);
tools/tools/net80211/wesside/wesside/wesside.c
935
fd = open(path, O_RDWR);
tools/tools/net80211/wlaninject/wlaninject.c
93
fd = open(buf, O_RDWR);
tools/tools/netmap/pkt-gen.c
2883
if( (fd = open(clonedev, O_RDWR)) < 0 ) {
tools/tools/nvmf/nvmfd/ctl.c
33
ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
tools/tools/nvmf/nvmfd/ctl.c
37
ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
tools/tools/nvmf/nvmfd/devices.c
111
fd = open(config, O_RDWR);
tools/tools/pciroms/pciroms.c
135
if ((pci_fd = open(_PATH_DEVPCI, O_RDWR)) == -1) {
tools/tools/pciroms/pciroms.c
317
if ((fd = open(filename, O_CREAT|O_RDWR|O_TRUNC|O_NOFOLLOW,
tools/tools/syscall_timing/syscall_timing.c
162
fd = open(path, O_RDWR | O_CREAT, 0600);
tools/tools/syscall_timing/syscall_timing.c
170
fd = open(path, O_RDWR | O_CREAT, 0600);
tools/tools/syscall_timing/syscall_timing.c
698
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/syscall_timing/syscall_timing.c
704
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/syscall_timing/syscall_timing.c
719
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/syscall_timing/syscall_timing.c
743
shmfd = shm_open(SHM_ANON, O_CREAT | O_RDWR, 0600);
tools/tools/tionxcl/tionxcl.c
85
fd = open(ttyname, O_RDWR);
usr.bin/backlight/backlight.c
154
if ((fd = open(device_name, O_RDWR)) == -1)
usr.bin/brandelf/brandelf.c
128
flags = change || force ? O_RDWR : O_RDONLY;
usr.bin/brandelf/brandelf.c
130
if (flags == O_RDWR)
usr.bin/cap_mkdb/cap_mkdb.c
109
if ((capdbp = dbopen(capname, O_CREAT | O_TRUNC | O_RDWR,
usr.bin/ctlstat/ctlstat.c
971
if ((fd = open(CTL_DEFAULT_DEV, O_RDWR)) == -1)
usr.bin/elfctl/elfctl.c
144
editfeatures ? O_RDWR : O_RDONLY, 0)) < 0) {
usr.bin/finger/util.c
154
(db = dbopen(NULL, O_RDWR, 0, DB_BTREE, NULL)) == NULL)
usr.bin/gcore/gcore.c
81
fd = open(corefile, O_RDWR | O_CREAT | O_TRUNC, DEFFILEMODE);
usr.bin/gzip/gzip.c
1653
ofd = open(outfile, O_RDWR, 0);
usr.bin/indent/indent.c
1249
bakfd = open(bakfile, O_RDWR | O_CREAT | O_TRUNC, 0600);
usr.bin/iscsictl/iscsictl.c
881
iscsi_fd = open(ISCSI_PATH, O_RDWR);
usr.bin/iscsictl/iscsictl.c
886
iscsi_fd = open(ISCSI_PATH, O_RDWR);
usr.bin/iscsictl/periphs.c
73
if ((fd = open(XPT_DEVICE, O_RDWR)) == -1) {
usr.bin/mail/names.c
315
image = open(tempname, O_RDWR);
usr.bin/mkuzip/mkuzip.c
300
cfs.fdw = open(oname, (cfs.en_dedup ? O_RDWR : O_WRONLY) | O_TRUNC | O_CREAT,
usr.bin/msgs/msgs.c
771
fd = open(fname, O_RDWR|O_EXCL|O_CREAT|O_APPEND);
usr.bin/mt/mt.c
241
if ((mtfd = open(tape, comp->c_ronly ? O_RDONLY : O_RDWR)) < 0)
usr.bin/nohup/nohup.c
103
fd = open(p = path, O_RDWR | O_CREAT | O_APPEND,
usr.bin/nohup/nohup.c
97
fd = open(p, O_RDWR | O_CREAT | O_APPEND, S_IRUSR | S_IWUSR);
usr.bin/posixmqcontrol/posixmqcontrol.c
427
int flags = O_RDWR;
usr.bin/posixshmcontrol/posixshmcontrol.c
503
fd = shm_open(path, O_RDWR, 0);
usr.bin/posixshmcontrol/posixshmcontrol.c
67
fd = shm_open(path, O_RDWR | O_CREAT, mode);
usr.bin/posixshmcontrol/posixshmcontrol.c
73
fd = shm_create_largepage(path, O_RDWR, idx,
usr.bin/resizewin/resizewin.c
85
if ((fd = open("/dev/tty", O_RDWR | O_NONBLOCK)) == -1)
usr.bin/script/script.c
197
if ((fm_fd = open("/dev/filemon", O_RDWR | O_CLOEXEC)) == -1)
usr.bin/sdiotool/sdiotool.c
514
if ((cam_dev = cam_open_spec_device(device, unit, O_RDWR, NULL)) == NULL)
usr.bin/tcopy/tcopy.cc
338
fd = open(name, O_RDWR|O_CREAT, DEFFILEMODE);
usr.bin/tcopy/tcopy.cc
467
fd = open(arg, O_RDWR|O_CREAT, DEFFILEMODE);
usr.bin/tip/libacu/v831.c
60
if ((AC = open(acu, O_RDWR)) < 0) {
usr.bin/tip/libacu/v831.c
88
if ((FD = open(DV, O_RDWR)) < 0) {
usr.bin/tip/tip/hunt.c
78
FD = open(cp, (O_RDWR |
usr.bin/tip/tip/uucplock.c
62
fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0660);
usr.bin/tip/tip/uucplock.c
68
fd = open(tbuf, O_RDWR, 0);
usr.bin/tsort/tsort.c
233
(db = dbopen(NULL, O_RDWR, 0, DB_HASH, NULL)) == NULL)
usr.bin/usbhidaction/usbhidaction.c
150
fd = open(dev, O_RDWR);
usr.bin/usbhidctl/usbhid.c
510
f = open(dev, O_RDWR);
usr.sbin/acpi/acpiconf/acpiconf.c
51
acpifd = open(ACPIDEV, O_RDWR);
usr.sbin/apm/apm.c
449
fd = open(APMDEV, O_RDWR);
usr.sbin/apm/apm.c
451
} else if ((fd = open(APMDEV, O_RDWR)) >= 0)
usr.sbin/apmd/apmd.c
681
if ((apmnorm_fd = open(APM_NORM_DEVICEFILE, O_RDWR)) == -1) {
usr.sbin/apmd/apmd.c
689
if ((apmctl_fd = open(APM_CTL_DEVICEFILE, O_RDWR)) == -1) {
usr.sbin/autofs/automountd.c
493
autofs_fd = open(AUTOFS_PATH, O_RDWR | O_CLOEXEC);
usr.sbin/autofs/automountd.c
498
autofs_fd = open(AUTOFS_PATH, O_RDWR | O_CLOEXEC);
usr.sbin/autofs/common.c
1188
fd = open(_PATH_DEVNULL, O_RDWR, 0);
usr.sbin/autofs/popen.c
82
nullfd = open(_PATH_DEVNULL, O_RDWR, 0);
usr.sbin/bhyve/block_if.c
547
fd = open(path, (ro ? O_RDONLY : O_RDWR) | extra);
usr.sbin/bhyve/bootrom.c
242
varfd = open(varfile, O_RDWR);
usr.sbin/bhyve/net_backends.c
107
be->fd = open(tbuf, O_RDWR);
usr.sbin/bhyve/pci_passthru.c
139
fd = open(_PATH_DEVPCI, O_RDWR, 0);
usr.sbin/bhyve/pci_virtio_input.c
658
sc->vsc_fd = open(sc->vsc_evdev, O_RDWR | O_NONBLOCK);
usr.sbin/bhyve/pci_virtio_scsi.c
1053
sc->vss_ctl_fd = open(devname, O_RDWR);
usr.sbin/bhyve/slirp/slirp-helper.c
489
fd = open("/dev/null", O_RDWR);
usr.sbin/bhyve/snapshot.c
1241
fd_checkpoint = openat(fddir, checkpoint_file, O_RDWR | O_CREAT | O_TRUNC, 0700);
usr.sbin/bhyve/tpm_emul_passthru.c
44
tpm->fd = open(path, O_RDWR);
usr.sbin/bhyve/uart_backend.c
388
fd = open(path, O_RDWR | O_NONBLOCK);
usr.sbin/bhyveload/bhyveload.c
703
fd = open(path, O_RDWR | O_NONBLOCK);
usr.sbin/bhyveload/bhyveload.c
722
fd = open(path, O_RDWR);
usr.sbin/bluetooth/bthidd/btuinput.c
324
fd = open("/dev/uinput", O_RDWR | O_NONBLOCK);
usr.sbin/bluetooth/bthidd/server.c
77
srv->cons = open("/dev/consolectl", O_RDWR);
usr.sbin/bluetooth/bthidd/session.c
109
s->vkbd = open("/dev/vkbdctl", O_RDWR);
usr.sbin/bluetooth/btpand/btpand.c
253
fd = open(_PATH_DEVNULL, O_RDWR, 0);
usr.sbin/bluetooth/btpand/tap.c
61
fd = open(interface_name, O_RDWR);
usr.sbin/bluetooth/hcsecd/parser.y
361
if ((f = open(tmp, O_RDWR|O_CREAT|O_TRUNC|O_EXCL, 0600)) < 0) {
usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.c
427
open("/dev/null", O_RDWR);
usr.sbin/bsdinstall/runconsoles/runconsoles.c
330
fd = open(dev, O_RDWR | O_NONBLOCK);
usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c
556
if ((md_fd = open(mddev, O_RDWR)) == -1) {
usr.sbin/camdd/camdd.c
3238
O_RDWR, NULL);
usr.sbin/camdd/camdd.c
3249
O_RDWR, NULL);
usr.sbin/camdd/camdd.c
3285
O_RDWR | O_CREAT, S_IWUSR |S_IRUSR);
usr.sbin/cpucontrol/cpucontrol.c
344
fd = open(dev, O_RDWR);
usr.sbin/cpucontrol/cpucontrol.c
452
fd = open(dev, O_RDWR);
usr.sbin/cron/cron/popen.c
123
(void)open(_PATH_DEVNULL, O_RDWR);
usr.sbin/cron/cron/popen.c
137
(void)open(_PATH_DEVNULL, O_RDWR);
usr.sbin/cron/cron/popen.c
139
(void)open(_PATH_DEVNULL, O_RDWR);
usr.sbin/crunch/crunchgen/crunchgen.c
723
if ((fd = open(tempfname, O_CREAT | O_EXCL | O_RDWR, 0600)) == -1) {
usr.sbin/crunch/crunchide/crunchide.c
223
fd = open(filename, O_RDWR, 0);
usr.sbin/ctladm/ctladm.c
1739
file_fd = open(filename, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR);
usr.sbin/ctladm/ctladm.c
4466
fd = open(device, O_RDWR);
usr.sbin/ctladm/ctladm.c
4471
fd = open(device, O_RDWR);
usr.sbin/ctld/kernel.cc
85
ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
usr.sbin/ctld/kernel.cc
90
ctl_fd = open(CTL_DEFAULT_DEV, O_RDWR);
usr.sbin/cxgbetool/cxgbetool.c
3870
if ((g.fd = open(buf, O_RDWR)) < 0)
usr.sbin/dconschat/dconschat.c
1095
dc->fd = open(devname, O_RDWR);
usr.sbin/dconschat/dconschat.c
1111
(dc->flags & F_RD_ONLY) ? O_RDONLY : O_RDWR, "dconschat");
usr.sbin/diskinfo/diskinfo.c
150
fd = open(argv[i], (opt_w ? O_RDWR : O_RDONLY) | O_DIRECT);
usr.sbin/edquota/edquota.c
372
if ((qf = quota_open(fs, quotatype, O_CREAT|O_RDWR)) == NULL) {
usr.sbin/efitable/efitable.c
151
efi_fd = open("/dev/efi", O_RDWR);
usr.sbin/efiwake/efiwake.c
92
efi_fd = open("/dev/efi", O_RDWR);
usr.sbin/fdformat/fdformat.c
220
if ((fd = open(device, O_RDWR | O_NONBLOCK)) < 0)
usr.sbin/fdwrite/fdwrite.c
127
if((fd = open(device, O_RDWR)) < 0)
usr.sbin/fifolog/lib/fifolog_int.c
62
f->fd = open(fname, mode ? O_RDWR : O_RDONLY);
usr.sbin/fwcontrol/fwcontrol.c
650
*fd = open(devname, O_RDWR);
usr.sbin/i2c/i2c.c
670
fd = open(devbuf, O_RDWR);
usr.sbin/i2c/i2c.c
879
fd = open(dev, O_RDWR);
usr.sbin/iovctl/iovctl.c
144
fd = open(dev, O_RDWR);
usr.sbin/iovctl/iovctl.c
279
fd = open(dev, O_RDWR);
usr.sbin/iscsid/iscsid.c
738
iscsi_fd = open(ISCSI_PATH, O_RDWR);
usr.sbin/iscsid/iscsid.c
743
iscsi_fd = open(ISCSI_PATH, O_RDWR);
usr.sbin/lpr/lpd/printjob.c
1885
pfd = open(pp->lp, pp->rw ? O_RDWR : O_WRONLY);
usr.sbin/lpr/lpr/lpr.c
489
if ((tfd = open(tfname, O_RDWR)) >= 0) {
usr.sbin/lpr/lpr/lpr.c
823
if ((fd = open(buf, O_RDWR|O_CREAT, 0664)) < 0) {
usr.sbin/makefs/ffs.c
493
int oflags = O_RDWR | O_CREAT;
usr.sbin/makefs/msdos.c
180
fsopts->fd = open(image, O_RDWR);
usr.sbin/makefs/zfs/vdev.c
418
zfs->fd = open(image, O_RDWR | O_CREAT | O_TRUNC, 0644);
usr.sbin/mfiutil/mfi_bbu.c
130
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_bbu.c
167
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
1064
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
1213
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
1250
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
164
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
589
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
871
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_config.c
939
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
379
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
494
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
551
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
607
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
673
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
733
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_drive.c
76
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_evt.c
548
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_evt.c
78
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_flash.c
123
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_foreign.c
295
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_foreign.c
49
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_patrol.c
200
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_patrol.c
226
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_patrol.c
296
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_patrol.c
90
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_properties.c
131
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_properties.c
79
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_volume.c
298
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mfiutil/mfi_volume.c
407
fd = mfi_open(mfi_device, O_RDWR);
usr.sbin/mlx5tool/mlx5tool.c
371
ctldev = open(MLX5_DEV_PATH, O_RDWR);
usr.sbin/moused/moused/moused.c
1863
fd = open(path, O_RDWR | O_NONBLOCK);
usr.sbin/moused/moused/moused.c
761
if ((cfd = open("/dev/consolectl", O_RDWR, 0)) == -1)
usr.sbin/moused/msconvd/msconvd.c
584
rodent.mfd = open(rodent.portname, O_RDWR | O_NONBLOCK);
usr.sbin/moused/msconvd/msconvd.c
793
fd = open("/dev/uinput", O_RDWR | O_NONBLOCK);
usr.sbin/mpsutil/mps_cmd.c
648
return (open(path, O_RDWR));
usr.sbin/mpsutil/mps_flash.c
91
fd = open(firmware_file, O_CREAT | O_TRUNC | O_RDWR, 0644);
usr.sbin/mptable/mptable.c
695
ofd = open( "/tmp/mpdump", O_CREAT | O_RDWR, 0666 );
usr.sbin/mptutil/mpt_cam.c
495
dev = cam_open_device(disks[count].devname, O_RDWR);
usr.sbin/mptutil/mpt_cam.c
54
xptfd = open(XPT_DEVICE, O_RDWR);
usr.sbin/mptutil/mpt_cmd.c
553
return (open(path, O_RDWR));
usr.sbin/mptutil/mpt_config.c
110
vfd = open(path, O_RDWR);
usr.sbin/mptutil/mpt_config.c
126
dfd = open(path, O_RDWR);
usr.sbin/nfsd/nfsd.c
1131
stable_fd = open(NFSD_STABLERESTART, O_RDWR, 0);
usr.sbin/nfsd/nfsd.c
1133
stable_fd = open(NFSD_STABLERESTART, O_RDWR | O_CREAT, 0600);
usr.sbin/nfsd/nfsd.c
1144
backup_fd = open(NFSD_STABLEBACKUP, O_RDWR, 0);
usr.sbin/nfsd/nfsd.c
1146
backup_fd = open(NFSD_STABLEBACKUP, O_RDWR | O_CREAT,
usr.sbin/nvram/nvram.c
103
fd = open(DEVICE_NAME, O_RDWR);
usr.sbin/pciconf/pciconf.c
1310
fd = open(_PATH_DEVPCI, O_RDWR, 0);
usr.sbin/pciconf/pciconf.c
1342
fd = open(_PATH_DEVPCI, O_RDWR, 0);
usr.sbin/pciconf/pciconf.c
1359
fd = open(_PATH_DEVPCI, O_RDWR, 0);
usr.sbin/pciconf/pciconf.c
1406
fd = open(_PATH_DEVPCI, O_RDWR, 0);
usr.sbin/pciconf/pciconf.c
299
fd = open(_PATH_DEVPCI, (bridge || caps || errors) ? O_RDWR : O_RDONLY,
usr.sbin/pmcstat/pmcpl_gprof.c
133
if ((fd = open(pathname, O_RDWR|O_NOFOLLOW|O_CREAT,
usr.sbin/pmcstat/pmcpl_gprof.c
210
if ((fd = open(pathname, O_RDWR | O_NOFOLLOW, 0)) < 0)
usr.sbin/ppp/bundle.c
726
bundle.dev.fd = ID0open(bundle.dev.Name, O_RDWR);
usr.sbin/ppp/chap.c
309
if (open(_PATH_DEVNULL, O_RDWR) != STDERR_FILENO) {
usr.sbin/ppp/chat.c
746
if (open(_PATH_TTY, O_RDWR) != 3)
usr.sbin/ppp/chat.c
747
open(_PATH_DEVNULL, O_RDWR); /* Leave it closed if it fails... */
usr.sbin/ppp/command.c
661
else if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
usr.sbin/ppp/main.c
320
if ((holdfd[0] = open(_PATH_DEVNULL, O_RDWR)) == -1) {
usr.sbin/ppp/physical.c
1020
p->fd = ID0open(p->name.full, O_RDWR | O_NONBLOCK);
usr.sbin/pw/cpdir.c
128
destfd = openat(rootfd, path, O_RDWR | O_CREAT | O_EXCL,
usr.sbin/pw/pw_conf.c
421
if ((fd = open(file, O_CREAT|O_RDWR|O_TRUNC|O_EXLOCK, 0644)) == -1)
usr.sbin/pw/pw_user.c
1489
close(openat(conf.rootfd, path +1, O_RDWR | O_CREAT, 0600));
usr.sbin/pwd_mkdb/pwd_mkdb.c
210
O_RDWR|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo);
usr.sbin/pwd_mkdb/pwd_mkdb.c
217
O_RDWR|O_EXCL, PERM_SECURE, DB_HASH, &openinfo);
usr.sbin/pwd_mkdb/pwd_mkdb.c
274
O_RDWR|O_CREAT|O_EXCL, PERM_INSECURE, DB_HASH, &openinfo);
usr.sbin/pwd_mkdb/pwd_mkdb.c
280
O_RDWR|O_CREAT|O_EXCL, PERM_SECURE, DB_HASH, &openinfo);
usr.sbin/pwm/pwm.c
144
if ((fd = open(device_name, O_RDWR)) == -1) {
usr.sbin/rarpd/rarpd.c
384
fd = open(device, O_RDWR);
usr.sbin/rpc.lockd/kern.c
132
devfd = open(_PATH_DEV _PATH_NFSLCKDEV, O_RDWR | O_NONBLOCK);
usr.sbin/rpc.lockd/lockd_lock.c
1062
nmf->fd = fhopen(&fl->filehandle, O_RDWR);
usr.sbin/rpc.statd/file.c
179
status_fd = open(filename, O_RDWR);
usr.sbin/rpc.statd/file.c
182
status_fd = open(filename, O_RDWR | O_CREAT, 0644);
usr.sbin/rpc.yppasswdd/yppasswdd_server.c
426
#define FLAGS O_RDWR|O_CREAT
usr.sbin/rpc.ypupdated/yp_dbupdate.c
91
dbp = yp_open_db_rw(domptr, map, O_RDWR);
usr.sbin/rtsold/cap_script.c
68
null = open("/dev/null", O_RDWR);
usr.sbin/sa/db.c
154
if ((ddb = dbopen(dbname, O_RDWR|O_CREAT|O_TRUNC, 0644,
usr.sbin/sa/db.c
63
if ((*mdb = dbopen(NULL, O_RDWR, 0, DB_BTREE, bti)) == NULL)
usr.sbin/sa/pdb.c
180
output_pacct_db = dbopen(NULL, O_RDWR, 0, DB_BTREE, &bti);
usr.sbin/services_mkdb/services_mkdb.c
142
db = dbopen(tname, O_RDWR | O_CREAT | O_EXCL,
usr.sbin/services_mkdb/uniq.c
67
if ((db = dbopen(NULL, O_RDWR, 0, DB_HASH, &hinfo)) == NULL)
usr.sbin/sesutil/sesutil.c
234
if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) {
usr.sbin/sesutil/sesutil.c
452
if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) {
usr.sbin/sesutil/sesutil.c
755
if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) {
usr.sbin/sesutil/sesutil.c
908
if ((fd = open(g.gl_pathv[i], O_RDWR)) < 0) {
usr.sbin/smbmsg/smbmsg.c
324
if ((fd = open(dev, O_RDWR)) == -1)
usr.sbin/spi/spi.c
335
hdev = open(dev_name, O_RDWR);
usr.sbin/syslogd/syslogd.c
699
nulldesc = open(_PATH_DEVNULL, O_RDWR);
usr.sbin/trim/trim.c
222
fd = opendev(path, O_RDWR | O_DIRECT);
usr.sbin/uathload/uathload.c
172
msg = open(msgdev, O_RDWR, 0);
usr.sbin/uhsoctl/uhsoctl.c
1145
ctx->fd = open(tty, O_RDWR);
usr.sbin/uhsoctl/uhsoctl.c
460
fd = open(respath, O_RDWR | O_CREAT | O_NOFOLLOW, 0666);
usr.sbin/usbconfig/dump.c
498
f = open(buf, O_RDWR);
usr.sbin/valectl/valectl.c
217
fd = open("/dev/netmap", O_RDWR);
usr.sbin/virtual_oss/virtual_equalizer/equalizer.c
362
int fd = open(dsp, O_RDWR);
usr.sbin/virtual_oss/virtual_oss/httpd.c
135
*pfd = fd = open("/dev/bpf", O_RDWR);
usr.sbin/virtual_oss/virtual_oss/main.c
2596
int pidfile = open(voss_pid_path, O_RDWR | O_CREAT | O_TRUNC, 0600);
usr.sbin/virtual_oss/virtual_oss_cmd/command.c
69
fd = open(argv[1], O_RDWR);
usr.sbin/wake/wake.c
192
if ((bpf = open(_PATH_BPF, O_RDWR)) == -1)
usr.sbin/watch/watch.c
154
mode = O_RDWR;
usr.sbin/watchdogd/watchdogd.c
244
fd = open("/dev/" _PATH_WATCHDOG, O_RDWR);
usr.sbin/yp_mkdb/yp_mkdb.c
192
if ((dbp = open_db(map, O_RDWR|O_EXLOCK|O_EXCL|O_CREAT)) == NULL)
usr.sbin/ypbind/ypbind.c
933
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
935
if ((fd = open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1)
usr.sbin/ypbind/ypbind.c
939
if ((fd = open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1) {
usr.sbin/ypbind/ypbind.c
941
if ((fd = open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1)
usr.sbin/zonectl/zonectl.c
508
open_flags = O_RDWR;