Home
last modified time | relevance | path

Searched refs:O_RDONLY (Results 1 – 25 of 1151) sorted by relevance

12345678910>>...47

/external/clang/test/Analysis/
Dunix-api.c3 #ifndef O_RDONLY
4 #define O_RDONLY 0 macro
16 fd = open(path, O_RDONLY); // no-warning in open_1()
24 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than three ar… in open_2()
31 fd = open(path, O_RDONLY, NULL); // expected-warning{{Third argument to 'open' is not an integer}} in open_3()
38 fd = open(path, O_RDONLY, ""); // expected-warning{{Third argument to 'open' is not an integer}} in open_4()
48 fd = open(path, O_RDONLY, st); // expected-warning{{Third argument to 'open' is not an integer}} in open_5()
58 fd = open(path, O_RDONLY, st.val); // no-warning in open_6()
65 …fd = open(path, O_RDONLY, &open); // expected-warning{{Third argument to 'open' is not an integer}} in open_7()
72 fd = open(path, O_RDONLY, 0.0f); // expected-warning{{Third argument to 'open' is not an integer}} in open_8()
/external/ltp/testcases/kernel/syscalls/open/
Dopen11.c74 .flags = O_RDONLY,
110 .flags = O_RDONLY,
124 .flags = O_RDONLY | O_DIRECTORY,
132 .flags = O_RDONLY,
154 .flags = O_RDONLY,
175 .flags = O_RDONLY,
197 .flags = O_RDONLY,
227 .flags = O_RDONLY | O_CREAT,
234 .flags = O_RDONLY | O_CREAT,
241 .flags = O_RDONLY | O_CREAT,
[all …]
/external/syzkaller/sys/akaros/
Ddev.txt7 …WD], path ptr[in, string["/dev/random"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
8 …D], path ptr[in, string["/dev/urandom"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
10 …WD], path ptr[in, string["/dev/config"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
12 …D], path ptr[in, string["/dev/cputime"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
13 …D], path ptr[in, string["/dev/drivers"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
16 …DCWD], path ptr[in, string["/dev/klog"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
17 …CWD], path ptr[in, string["/dev/kmesg"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
18 …WD], path ptr[in, string["/dev/kprint"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
19 …DCWD], path ptr[in, string["/dev/null"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
20 …, path ptr[in, string["/dev/osversion"]], path_l len[path], oflag const[O_RDONLY], mode const[0]) …
[all …]
/external/linux-kselftest/tools/testing/selftests/exec/
Dexecveat.c141 int in_fd = open_or_die(src, O_RDONLY); in exe_cp()
193 fd = open(longpath, O_RDONLY); in check_execveat_pathmax()
229 int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY); in run_tests()
231 O_DIRECTORY|O_RDONLY); in run_tests()
232 int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY); in run_tests()
233 int root_dfd = open_or_die("/", O_DIRECTORY|O_RDONLY); in run_tests()
234 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests()
235 int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC); in run_tests()
236 int fd = open_or_die("execveat", O_RDONLY); in run_tests()
237 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests()
[all …]
/external/perfetto/src/base/
Dscoped_file_unittest.cc62 int raw_fd = open(kNullFilename, O_RDONLY); in TEST()
88 int raw_fd1 = open(kNullFilename, O_RDONLY); in TEST()
89 int raw_fd2 = open(kZeroFilename, O_RDONLY); in TEST()
104 scoped_file.reset(open(kNullFilename, O_RDONLY)); in TEST()
110 int raw_fd = open(kNullFilename, O_RDONLY); in TEST()
121 int raw_fd1 = open(kNullFilename, O_RDONLY); in TEST()
122 int raw_fd2 = open(kZeroFilename, O_RDONLY); in TEST()
143 int raw_fd1 = open(kNullFilename, O_RDONLY); in TEST()
144 int raw_fd2 = open(kZeroFilename, O_RDONLY); in TEST()
172 int raw_fd = open(kNullFilename, O_RDONLY); in TEST()
/external/strace/xlat/
Dopen_access_modes.h6 #if defined(O_RDONLY) || (defined(HAVE_DECL_O_RDONLY) && HAVE_DECL_O_RDONLY)
8 static_assert((O_RDONLY) == (0), "O_RDONLY != 0");
11 # define O_RDONLY 0
40 [O_RDONLY] = XLAT(O_RDONLY),
/external/ltp/testcases/kernel/syscalls/fcntl/
Dfcntl32.c43 {O_RDONLY, O_RDONLY},
44 {O_RDONLY, O_WRONLY},
45 {O_RDONLY, O_RDWR},
46 {O_WRONLY, O_RDONLY},
49 {O_RDWR, O_RDONLY},
/external/ltp/testcases/kernel/syscalls/fsetxattr/
Dfsetxattr02.c76 .fflags = O_RDONLY,
85 .fflags = O_RDONLY,
94 .fflags = O_RDONLY,
104 .fflags = (O_RDONLY | O_NONBLOCK),
113 .fflags = O_RDONLY,
122 .fflags = O_RDONLY,
131 .fflags = O_RDONLY,
/external/ltp/testcases/kernel/syscalls/fgetxattr/
Dfgetxattr02.c84 .fflags = O_RDONLY,
95 .fflags = O_RDONLY,
106 .fflags = O_RDONLY,
117 .fflags = (O_RDONLY | O_NONBLOCK),
127 .fflags = O_RDONLY,
138 .fflags = O_RDONLY,
149 .fflags = O_RDONLY,
/external/ltp/testcases/kernel/logging/kmsg/
Dkmsg01.c96 f = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in find_msg()
252 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_nonblock()
268 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY); in test_read_block()
284 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_partial_read()
360 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_returns_first_message()
413 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_messages_overwritten()
502 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
503 fd2 = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
538 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
/external/toybox/toys/other/
Dacpi.c37 if ((fd = openat(dirfd, name, O_RDONLY)) < 0) return -1;
55 if (0 <= (dfd = open((TT.cpath=dirtree_path(tree, NULL)), O_RDONLY))) { in acpi_callback()
56 if ((fd = openat(dfd, "type", O_RDONLY)) < 0) goto done; in acpi_callback()
94 if (0 <= (dfd = open((TT.cpath=dirtree_path(tree, NULL)), O_RDONLY))) { in temp_callback()
119 if (0 <= (dfd = open((TT.cpath=dirtree_path(tree, &dfd)), O_RDONLY))) { in cool_callback()
/external/ltp/testcases/kernel/security/tomoyo/
Dtomoyo_new_test.c50 result = open("/etc/fstab", O_RDONLY); in test_read_etc_fstab()
200 result = open("/tmp/testfile0", O_RDONLY, 0600); in test_file_open_0()
205 result = open("/tmp/testfile1", O_CREAT | O_RDONLY, 0600); in test_file_open_1()
210 result = open("/tmp/testfile2", O_TRUNC | O_RDONLY, 0600); in test_file_open_2()
215 result = open("/tmp/testfile3", O_TRUNC | O_CREAT | O_RDONLY, 0600); in test_file_open_3()
220 result = open("/tmp/testfile4", O_APPEND | O_RDONLY, 0600); in test_file_open_4()
225 result = open("/tmp/testfile5", O_APPEND | O_CREAT | O_RDONLY, 0600); in test_file_open_5()
230 result = open("/tmp/testfile6", O_APPEND | O_TRUNC | O_RDONLY, 0600); in test_file_open_6()
236 O_APPEND | O_TRUNC | O_CREAT | O_RDONLY, 0600); in test_file_open_7()
Dtomoyo_new_file_test.c190 fd = open("/dev/null", O_RDONLY); in stage_file_test()
195 fd = open("/dev/null", O_RDONLY); in stage_file_test()
202 fd = open("/dev/null", O_RDONLY); in stage_file_test()
207 fd = open("/dev/null", O_RDONLY); in stage_file_test()
214 fd = open("/dev/null", O_RDONLY); in stage_file_test()
219 fd = open("/dev/null", O_RDONLY); in stage_file_test()
226 fd = open("/dev/null", O_RDONLY); in stage_file_test()
231 fd = open("/dev/null", O_RDONLY); in stage_file_test()
277 fd = open("/dev/null", O_RDONLY); in stage_file_test()
282 fd = open("/dev/null", O_RDONLY); in stage_file_test()
[all …]
/external/perfetto/src/profiling/memory/
Dunwinding_unittest.cc37 base::ScopedFile proc_mem(base::OpenFile("/proc/self/mem", O_RDONLY)); in TEST()
51 base::ScopedFile proc_mem(base::OpenFile("/proc/self/mem", O_RDONLY)); in TEST()
63 base::ScopedFile proc_maps(base::OpenFile("/proc/self/maps", O_RDONLY)); in TEST()
128 base::ScopedFile proc_maps(base::OpenFile("/proc/self/maps", O_RDONLY)); in TEST()
129 base::ScopedFile proc_mem(base::OpenFile("/proc/self/mem", O_RDONLY)); in TEST()
/external/pdfium/third_party/libtiff/
Dtif_open.c55 m = O_RDONLY; in _TIFFgetMode()
158 if (m == O_RDONLY )
162 if (m == O_RDONLY || m == O_RDWR)
245 if (m == O_RDONLY)
249 if (m == O_RDONLY)
253 if (m == O_RDONLY)
257 if (m == O_RDONLY)
273 if (tif->tif_mode == O_RDONLY) {
483 tif->tif_mode = O_RDONLY; /* XXX avoid flush */
/external/linux-kselftest/tools/testing/selftests/proc/
Dfd-002-posix-eq.c32 fd0 = open("/", O_DIRECTORY|O_RDONLY); in main()
36 fd1 = open(buf, O_RDONLY); in main()
40 fd2 = open(buf, O_RDONLY); in main()
/external/jemalloc_new/src/
Dpages.c456 fd = (int)syscall(SYS_open, "/proc/sys/vm/overcommit_memory", O_RDONLY | in os_overcommits_proc()
459 fd = (int)syscall(SYS_open, "/proc/sys/vm/overcommit_memory", O_RDONLY); in os_overcommits_proc()
467 AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC); in os_overcommits_proc()
470 AT_FDCWD, "/proc/sys/vm/overcommit_memory", O_RDONLY); in os_overcommits_proc()
477 fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY | O_CLOEXEC); in os_overcommits_proc()
479 fd = open("/proc/sys/vm/overcommit_memory", O_RDONLY); in os_overcommits_proc()
546 "/sys/kernel/mm/transparent_hugepage/enabled", O_RDONLY); in init_thp_state()
548 int fd = open("/sys/kernel/mm/transparent_hugepage/enabled", O_RDONLY); in init_thp_state()
/external/libchrome/ipc/
Dipc_send_fds_test.cc128 const int fd = open(kDevZeroPath, O_RDONLY); in RunServer()
176 int fd = open(kDevZeroPath, O_RDONLY); in DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT_WITH_CUSTOM_FIXTURE()
194 const int fd = open(kDevZeroPath, O_RDONLY); in DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT_WITH_CUSTOM_FIXTURE()
208 ASSERT_EQ(-1, open(kDevZeroPath, O_RDONLY)) in DEFINE_IPC_CHANNEL_MOJO_TEST_CLIENT_WITH_CUSTOM_FIXTURE()
/external/ltp/testcases/kernel/syscalls/fanotify/
Dfanotify02.c83 fd = SAFE_OPEN(fname, O_RDONLY); in test01()
116 fd = SAFE_OPEN(fname, O_RDONLY); in test01()
120 fd = SAFE_OPEN(".", O_RDONLY | O_DIRECTORY); in test01()
194 fd_notify = SAFE_FANOTIFY_INIT(FAN_CLASS_NOTIF, O_RDONLY); in setup()
/external/vboot_reference/cgpt/
Dcgpt_boot.c23 if (CGPT_OK != DriveOpen(params->drive_name, &drive, O_RDONLY, in CgptGetBootPartitionNumber()
69 int mode = O_RDONLY; in CgptBoot()
125 int fd = open(params->bootfile, O_RDONLY); in CgptBoot()
146 if (mode == O_RDONLY || CGPT_OK == WritePMBR(&drive)) in CgptBoot()
/external/strace/tests-m32/
Dopenat.c62 long fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); in main()
71 fd = syscall(__NR_openat, -100, sample, O_RDONLY); in main()
80 { ARG_STR(O_RDONLY) }, in main()
/external/strace/tests/
Dopenat.c62 long fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); in main()
71 fd = syscall(__NR_openat, -100, sample, O_RDONLY); in main()
80 { ARG_STR(O_RDONLY) }, in main()
/external/strace/tests-mx32/
Dopenat.c62 long fd = syscall(__NR_openat, -100, sample, O_RDONLY|O_CREAT, 0400); in main()
71 fd = syscall(__NR_openat, -100, sample, O_RDONLY); in main()
80 { ARG_STR(O_RDONLY) }, in main()
/external/linux-kselftest/tools/testing/selftests/efivarfs/
Dopen-unlink.c20 fd = open(path, O_RDONLY); in set_immutable()
51 fd = open(path, O_RDONLY); in get_immutable()
115 fd = open(path, O_RDONLY); in main()
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/shm_open/
D22-1.c29 fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT, S_IRUSR | S_IWUSR); in main()
35 fd = shm_open(SHM_NAME, O_RDONLY | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); in main()

12345678910>>...47