/external/llvm-project/clang/test/Analysis/ |
D | unix-api.c | 3 #ifndef O_RDONLY 4 #define O_RDONLY 0 macro 17 fd = open(path, O_RDONLY); // no-warning in open_1() 25 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argume… in open_2() 33 …fd = openat(base_fd, path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'openat' with more … in openat_2() 40 …fd = open(path, O_RDONLY, NULL); // expected-warning{{The 3rd argument to 'open' is not an integer… in open_3() 47 …fd = openat(base_fd, path, O_RDONLY, NULL); // expected-warning{{The 4th argument to 'openat' is n… in openat_3() 55 fd = open(path, O_RDONLY, ""); // expected-warning{{The 3rd argument to 'open' is not an integer}} in open_4() 65 fd = open(path, O_RDONLY, st); // expected-warning{{The 3rd argument to 'open' is not an integer}} in open_5() 75 fd = open(path, O_RDONLY, st.val); // no-warning in open_6() [all …]
|
D | unix-api.cpp | 3 #ifndef O_RDONLY 4 #define O_RDONLY 0 macro 22 fd = open(path, O_RDONLY); // no-warning in unix_open() 30 …fd = open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argume… in unix_open_misuse() 45 …fd = ::open(path, O_RDONLY, mode, NULL); // expected-warning{{Call to 'open' with more than 3 argu… in namespaced_open()
|
/external/clang/test/Analysis/ |
D | unix-api.c | 3 #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/ |
D | open11.c | 74 .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/linux-kselftest/tools/testing/selftests/exec/ |
D | execveat.c | 140 int in_fd = open_or_die(src, O_RDONLY); in exe_cp() 192 fd = open(longpath, O_RDONLY); in check_execveat_pathmax() 228 int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY); in run_tests() 230 O_DIRECTORY|O_RDONLY); in run_tests() 231 int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY); in run_tests() 232 int root_dfd = open_or_die("/", O_DIRECTORY|O_RDONLY); in run_tests() 233 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests() 234 int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC); in run_tests() 235 int fd = open_or_die("execveat", O_RDONLY); in run_tests() 236 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests() [all …]
|
/external/perfetto/src/base/ |
D | scoped_file_unittest.cc | 63 int raw_fd = open(kNullFilename, O_RDONLY); in TEST() 89 int raw_fd1 = open(kNullFilename, O_RDONLY); in TEST() 90 int raw_fd2 = open(kZeroFilename, O_RDONLY); in TEST() 105 scoped_file.reset(open(kNullFilename, O_RDONLY)); in TEST() 111 int raw_fd = open(kNullFilename, O_RDONLY); in TEST() 122 int raw_fd1 = open(kNullFilename, O_RDONLY); in TEST() 123 int raw_fd2 = open(kZeroFilename, O_RDONLY); in TEST() 144 int raw_fd1 = open(kNullFilename, O_RDONLY); in TEST() 145 int raw_fd2 = open(kZeroFilename, O_RDONLY); in TEST() 173 int raw_fd = open(kNullFilename, O_RDONLY); in TEST()
|
/external/strace/xlat/ |
D | open_access_modes.h | 6 #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/igt-gpu-tools/runner/ |
D | runner_tests.c | 51 int fd = openat(dirfd, name, O_RDONLY); in dump_file() 133 clear_directory_fd(openat(dirfd, dirent->d_name, O_DIRECTORY | O_RDONLY)); in clear_directory_fd() 144 int dirfd = open(name, O_DIRECTORY | O_RDONLY); in clear_directory() 194 igt_assert_f((fd = openat(dirfd, name, O_RDONLY)) >= 0, in assert_execution_created() 305 igt_require((dirfd = open(dirname, O_DIRECTORY | O_RDONLY)) >= 0); 340 igt_require((dirfd = open(dirname, O_DIRECTORY | O_RDONLY)) >= 0); 620 igt_assert_lt(open(nosuchfile, O_RDONLY), 0); 769 dirfd = open(dirname, O_DIRECTORY, O_RDONLY); 772 igt_assert_f((fd = openat(dirfd, "metadata.txt", O_RDONLY)), 820 dirfd = open(dirname, O_DIRECTORY, O_RDONLY); [all …]
|
/external/ltp/testcases/kernel/syscalls/fcntl/ |
D | fcntl32.c | 43 {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/linux-kselftest/tools/testing/selftests/bpf/ |
D | test_sysctl.c | 55 .open_flags = O_RDONLY, 66 .open_flags = O_RDONLY, 77 .open_flags = O_RDONLY, 98 .open_flags = O_RDONLY, 158 .open_flags = O_RDONLY, 179 .open_flags = O_RDONLY, 206 .open_flags = O_RDONLY, 222 .open_flags = O_RDONLY, 264 .open_flags = O_RDONLY, 306 .open_flags = O_RDONLY, [all …]
|
/external/ltp/testcases/kernel/syscalls/fsetxattr/ |
D | fsetxattr02.c | 76 .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/ |
D | fgetxattr02.c | 84 .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/perfetto/src/profiling/memory/ |
D | unwinding_unittest.cc | 37 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() 139 base::ScopedFile proc_maps(base::OpenFile("/proc/self/maps", O_RDONLY)); in TEST() 140 base::ScopedFile proc_mem(base::OpenFile("/proc/self/mem", O_RDONLY)); in TEST() 159 base::ScopedFile proc_maps(base::OpenFile("/proc/self/maps", O_RDONLY)); in TEST() 160 base::ScopedFile proc_mem(base::OpenFile("/proc/self/mem", O_RDONLY)); in TEST()
|
/external/ltp/testcases/kernel/logging/kmsg/ |
D | kmsg01.c | 77 f = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in find_msg() 233 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_nonblock() 249 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY); in test_read_block() 265 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_partial_read() 341 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_returns_first_message() 394 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_messages_overwritten() 483 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek() 484 fd2 = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek() 519 fd = SAFE_OPEN("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
|
/external/toybox/toys/other/ |
D | acpi.c | 37 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/pdfium/third_party/libtiff/ |
D | tif_open.c | 53 m = O_RDONLY; in _TIFFgetMode() 157 if (m == O_RDONLY ) 161 if (m == O_RDONLY || m == O_RDWR) 246 if (m == O_RDONLY) 250 if (m == O_RDONLY) 254 if (m == O_RDONLY) 258 if (m == O_RDONLY) 272 if( m == O_RDONLY ) 289 if (tif->tif_mode == O_RDONLY) { 499 tif->tif_mode = O_RDONLY; /* XXX avoid flush */
|
/external/linux-kselftest/tools/testing/selftests/proc/ |
D | fd-002-posix-eq.c | 32 fd0 = open("/", O_DIRECTORY|O_RDONLY); in main() 36 fd1 = open(buf, O_RDONLY); in main() 40 fd2 = open(buf, O_RDONLY); in main()
|
D | setns-dcache.c | 95 nsfd = open(buf, O_RDONLY); in main() 102 (void)open("/proc/net/unix", O_RDONLY); in main() 116 fd = open("/proc/net/unix", O_RDONLY); in main()
|
D | setns-sysvipc.c | 94 nsfd = open(buf, O_RDONLY); in main() 101 (void)open("/proc/sysvipc/shm", O_RDONLY); in main() 115 fd = open("/proc/sysvipc/shm", O_RDONLY); in main()
|
/external/ltp/testcases/kernel/security/tomoyo/ |
D | tomoyo_new_test.c | 50 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()
|
D | tomoyo_new_file_test.c | 190 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/ltp/testcases/kernel/syscalls/fanotify/ |
D | fanotify02.c | 83 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/libchrome/ipc/ |
D | ipc_send_fds_test.cc | 128 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/igt-gpu-tools/lib/ |
D | igt_sysfs.c | 135 return open(path, O_RDONLY); in igt_sysfs_open() 185 O_RDONLY); in igt_sysfs_open_parameters() 200 params = open(path, O_RDONLY); in igt_sysfs_open_parameters() 248 fd = openat(dir, attr, O_RDONLY); in igt_sysfs_read() 292 fd = openat(dir, attr, O_RDONLY); in igt_sysfs_get() 346 fd = openat(dir, attr, O_RDONLY); in igt_sysfs_scanf() 519 fd = open(buf, O_RDONLY); in bind_con()
|
/external/strace/tests-m32/ |
D | openat.c | 62 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()
|