/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 | 108 .flags = O_RDONLY, 146 .flags = O_RDONLY, 160 .flags = O_RDONLY | O_DIRECTORY, 170 .flags = O_RDONLY, 194 .flags = O_RDONLY, 215 .flags = O_RDONLY, 239 .flags = O_RDONLY, 273 .flags = O_RDONLY | O_CREAT, 280 .flags = O_RDONLY | O_CREAT, 287 .flags = O_RDONLY | O_CREAT, [all …]
|
/external/linux-kselftest/tools/testing/selftests/exec/ |
D | execveat.c | 139 int in_fd = open_or_die(src, O_RDONLY); in exe_cp() 181 fd = open(longpath, O_RDONLY); in check_execveat_pathmax() 217 int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY); in run_tests() 219 O_DIRECTORY|O_RDONLY); in run_tests() 220 int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY); in run_tests() 221 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests() 222 int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC); in run_tests() 223 int fd = open_or_die("execveat", O_RDONLY); in run_tests() 224 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests() 225 int fd_symlink = open_or_die("execveat.symlink", O_RDONLY); in run_tests() [all …]
|
/external/valgrind/memcheck/tests/linux/ |
D | sys-openat.c | 11 int dfd = open ("/tmp", O_RDONLY); in main() 12 __attribute__((unused)) int fd1 = openat (dfd, "abc", O_RDONLY); in main() 14 __attribute__((unused)) int fd2 = openat (0x12345678, "/tmp/abc", O_RDONLY); in main() 15 __attribute__((unused)) int fd3 = openat (AT_FDCWD, "abc", O_RDONLY); in main() 17 __attribute__((unused)) int fd4 = openat (0x12345678, "abc", O_RDONLY); in main()
|
/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/libchrome/sandbox/linux/services/ |
D | proc_util_unittest.cc | 17 base::ScopedFD proc_fd(open("/proc/", O_RDONLY | O_DIRECTORY)); in TEST() 20 int fd = open("/dev/null", O_RDONLY); in TEST() 32 int proc_fd = open("/proc/", O_RDONLY | O_DIRECTORY); in TEST() 40 int proc_fd = open("/proc/", O_RDONLY | O_DIRECTORY); in TEST() 52 int open_directory_fd = open("/proc/self/", O_RDONLY | O_DIRECTORY); in TEST()
|
D | proc_util.cc | 35 HANDLE_EINTR(open(path, O_RDONLY | O_DIRECTORY | O_CLOEXEC))); in OpenDirectory() 45 openat(proc_fd, "self/fd/", O_DIRECTORY | O_RDONLY | O_CLOEXEC)); in CountOpenFds() 75 openat(proc_fd, "self/fd/", O_DIRECTORY | O_RDONLY | O_CLOEXEC); in HasOpenDirectory() 111 HANDLE_EINTR(open("/proc/", O_DIRECTORY | O_RDONLY | O_CLOEXEC))); in HasOpenDirectory()
|
/external/libchrome/sandbox/linux/syscall_broker/ |
D | broker_process_unittest.cc | 76 int fd = open_broker.Open(NULL, O_RDONLY); in TEST() 103 fd = open_broker.Open(kR_WhiteListed, O_RDONLY); in TestOpenFilePerms() 127 fd = open_broker.Open(kR_WhiteListedButDenied, O_RDONLY); in TestOpenFilePerms() 150 fd = open_broker.Open(kW_WhiteListed, O_RDONLY); in TestOpenFilePerms() 169 fd = open_broker.Open(kRW_WhiteListed, O_RDONLY); in TestOpenFilePerms() 188 fd = open_broker.Open(k_NotWhitelisted, O_RDONLY); in TestOpenFilePerms() 208 fd = open_broker.Open(kRW_WhiteListed, O_RDONLY | O_WRONLY | O_RDWR); in TestOpenFilePerms() 259 int cpuinfo_fd = open_broker->Open(kFileCpuInfo, O_RDONLY); in TestBadPaths() 268 fd = open_broker->Open(kNotAbsPath, O_RDONLY); in TestBadPaths() 273 fd = open_broker->Open(kDotDotStart, O_RDONLY); in TestBadPaths() [all …]
|
D | broker_file_permission_unittest.cc | 93 case O_RDONLY: in CheckPerm() 94 ASSERT_TRUE(perm.CheckOpen(path, O_RDONLY, &file_to_open, NULL)); in CheckPerm() 101 ASSERT_FALSE(perm.CheckOpen(path, O_RDONLY, &file_to_open, NULL)); in CheckPerm() 108 ASSERT_TRUE(perm.CheckOpen(path, O_RDONLY, &file_to_open, NULL)); in CheckPerm() 176 CheckPerm(perm, kPath, O_RDONLY, false); in TEST() 185 CheckPerm(perm, kPathFile, O_RDONLY, false); in TEST()
|
/external/libtextclassifier/tests/ |
D | text-classification-model_test.cc | 36 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 47 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 70 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 88 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 105 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 153 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 176 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 234 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 284 int fd = open(model_path.c_str(), O_RDONLY); in TEST() 318 int fd = open(model_path.c_str(), O_RDONLY); in TEST()
|
/external/valgrind/memcheck/tests/solaris/ |
D | syscall_at.c | 22 int dfd = open(DIRECTORY, O_RDONLY); in main() 80 openat(dfd, FILENAME, O_RDONLY); in main() 81 openat(0x9038151, DIRECTORY FILENAME, O_RDONLY); in main() 82 openat(AT_FDCWD, FILENAME, O_RDONLY); in main() 83 openat(0x9038152, FILENAME, O_RDONLY); /* warning for this one */ in main()
|
/external/syslinux/com32/lib/sys/ |
D | zfopen.c | 12 int flags = O_RDONLY; in zfopen() 19 flags = O_RDONLY; in zfopen() 35 flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR; in zfopen()
|
/external/syslinux/com32/lib/ |
D | fopen.c | 11 int flags = O_RDONLY; in fopen() 18 flags = O_RDONLY; in fopen() 34 flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR; in fopen()
|
D | fopendev.c | 11 int flags = O_RDONLY; in fopendev() 18 flags = O_RDONLY; in fopendev() 34 flags = (flags & ~(O_RDONLY | O_WRONLY)) | O_RDWR; in fopendev()
|
/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/ltp/testcases/kernel/fs/dmapi/ |
D | mmap.c | 167 } else if ((fd = open(DummyFile, O_RDONLY)) == -1) { in main() 184 DummyFile, O_RDONLY, inoff, (long)inlen, 1); in main() 228 } else if ((fd = open(DummyFile, O_RDONLY)) == -1) { in main() 249 DummyFile, O_RDONLY, inoff, (long)inlen, 1); in main() 293 } else if ((fd = open(DummyFile, O_RDONLY)) == -1) { in main() 314 DummyFile, O_RDONLY, inoff, (long)inlen, 1); in main() 362 } else if ((fd = open(DummyFile, O_RDONLY)) == -1) { in main() 383 DummyFile, O_RDONLY, inoff, (long)inlen, 1); in main() 442 } else if ((fd = open(DummyFile, O_RDONLY)) == -1) { in main() 463 DummyFile, O_RDONLY, inoff, (long)inlen, 0); in main() [all …]
|
/external/ltp/testcases/kernel/logging/kmsg/ |
D | kmsg01.c | 100 f = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); in find_msg() 260 fd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_nonblock() 278 fd = open("/dev/kmsg", O_RDONLY); in test_read_block() 296 fd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_partial_read() 373 fd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_read_returns_first_message() 429 fd = open("/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_messages_overwritten() 523 fd = SAFE_OPEN(cleanup, "/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek() 524 fd2 = SAFE_OPEN(cleanup, "/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek() 559 fd = SAFE_OPEN(cleanup, "/dev/kmsg", O_RDONLY | O_NONBLOCK); in test_seek()
|
/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/pdfium/third_party/libtiff/ |
D | tif_open.c | 55 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/bison/lib/ |
D | fcntl.in.h | 216 # define O_EXEC O_RDONLY /* This is often close enough in older systems. */ 273 # define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ 284 #if ~O_ACCMODE & (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) 286 # define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH)
|
/external/linux-kselftest/tools/testing/selftests/efivarfs/ |
D | open-unlink.c | 19 fd = open(path, O_RDONLY); in set_immutable() 50 fd = open(path, O_RDONLY); in get_immutable() 114 fd = open(path, O_RDONLY); in main()
|
/external/vboot_reference/cgpt/ |
D | cgpt_boot.c | 23 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/ltp/testcases/kernel/syscalls/fanotify/ |
D | fanotify02.c | 114 fd = SAFE_OPEN(cleanup, fname, O_RDONLY); in main() 147 fd = SAFE_OPEN(cleanup, fname, O_RDONLY); in main() 151 fd = SAFE_OPEN(cleanup, ".", O_RDONLY | O_DIRECTORY); in main() 234 if ((fd_notify = fanotify_init(FAN_CLASS_NOTIF, O_RDONLY)) < 0) { in setup()
|
/external/valgrind/none/tests/ |
D | fdleak_dup2.c | 12 s1 = DO( open("/dev/null", O_RDONLY) ); in main() 13 s2 = DO( open("/dev/null", O_RDONLY) ); in main()
|