Home
last modified time | relevance | path

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

12345678910>>...12

/Linux-v5.10/tools/testing/selftests/exec/
Dexecveat.c142 int in_fd = open_or_die(src, O_RDONLY); in exe_cp()
194 fd = open(longpath, O_RDONLY); in check_execveat_pathmax()
230 int subdir_dfd = open_or_die("subdir", O_DIRECTORY|O_RDONLY); in run_tests()
232 O_DIRECTORY|O_RDONLY); in run_tests()
233 int dot_dfd = open_or_die(".", O_DIRECTORY|O_RDONLY); in run_tests()
234 int root_dfd = open_or_die("/", O_DIRECTORY|O_RDONLY); in run_tests()
235 int dot_dfd_path = open_or_die(".", O_DIRECTORY|O_RDONLY|O_PATH); in run_tests()
236 int dot_dfd_cloexec = open_or_die(".", O_DIRECTORY|O_RDONLY|O_CLOEXEC); in run_tests()
237 int fd = open_or_die("execveat", O_RDONLY); in run_tests()
238 int fd_path = open_or_die("execveat", O_RDONLY|O_PATH); in run_tests()
[all …]
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_sysctl.c55 .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 …]
/Linux-v5.10/tools/testing/selftests/openat2/
Dopenat2_test.c53 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
57 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
64 .arg.inner.flags = O_RDONLY, .size = 0, .err = -EINVAL }, in test_openat2_struct()
66 .arg.inner.flags = O_RDONLY, in test_openat2_struct()
71 .arg.inner.flags = O_RDONLY, .arg.extra1 = 0xdeadbeef, in test_openat2_struct()
74 .arg.inner.flags = O_RDONLY, .arg.extra2 = 0xfeedcafe, in test_openat2_struct()
77 .arg.inner.flags = O_RDONLY, .arg.extra3 = 0xabad1dea, in test_openat2_struct()
192 .how.flags = O_RDONLY, .how.mode = 0600, .err = -EINVAL }, in test_openat2_flags()
215 .how.flags = O_RDONLY, in test_openat2_flags()
/Linux-v5.10/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()
Dsetns-dcache.c95 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()
Dsetns-sysvipc.c94 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()
Dproc-pid-vm.c205 fd1 = open(buf, O_RDONLY|O_CLOEXEC); in make_exe()
269 if (open("/", O_RDONLY|O_DIRECTORY|O_PATH) != 0) { in main()
321 fd = open(buf, O_RDONLY); in main()
340 fd = open(buf, O_RDONLY); in main()
396 fd = open(buf, O_RDONLY); in main()
432 fd = open(buf, O_RDONLY); in main()
Dfd-003-kthread.c48 dir_fd = open(buf, O_RDONLY|O_DIRECTORY); in kernel_thread_fd()
56 fd = openat(dir_fd, "stat", O_RDONLY); in kernel_thread_fd()
90 fd = openat(dir_fd, "fd", O_RDONLY|O_DIRECTORY); in kernel_thread_fd()
Dread.c45 fd = openat(dirfd(d), filename, O_RDONLY|O_NONBLOCK); in f_reg()
107 fd = openat(dirfd(d), de->d_name, O_DIRECTORY|O_RDONLY); in f()
/Linux-v5.10/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()
/Linux-v5.10/samples/timers/
Dhpet_example.c89 fd = open(argv[0], O_RDONLY); in hpet_open_close()
109 fd = open(argv[0], O_RDONLY); in hpet_info()
149 fd = open(argv[0], O_RDONLY); in hpet_poll()
243 fd = open(argv[0], O_RDONLY); in hpet_fasync()
/Linux-v5.10/tools/testing/selftests/bpf/prog_tests/
Dd_path.c44 procfd = open("/proc/self/comm", O_RDONLY); in trigger_fstat_events()
47 devfd = open("/dev/urandom", O_RDONLY); in trigger_fstat_events()
50 localfd = open("/tmp/d_path_loadgen.txt", O_CREAT | O_RDONLY, 0644); in trigger_fstat_events()
/Linux-v5.10/tools/perf/util/
Dzlib.c32 input_fd = open(input, O_RDONLY); in gzip_decompress_to_file()
85 int fd = open(input, O_RDONLY); in gzip_is_compressed()
/Linux-v5.10/tools/testing/selftests/timens/
Dprocfs.c44 parent_ns = open(path, O_RDONLY); in init_namespaces()
54 child_ns = open(path, O_RDONLY); in init_namespaces()
/Linux-v5.10/samples/pidfd/
Dpidfd-metadata.c58 procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC); in pidfd_metadata_fd()
105 statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC); in main()
/Linux-v5.10/tools/testing/selftests/core/
Dclose_range_test.c44 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
108 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
197 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
/Linux-v5.10/tools/testing/selftests/timers/
Dclocksource-switch.c47 fd = open("/sys/devices/system/clocksource/clocksource0/available_clocksource", O_RDONLY); in get_clocksources()
79 fd = open("/sys/devices/system/clocksource/clocksource0/current_clocksource", O_RDONLY); in get_cur_clocksource()
/Linux-v5.10/tools/laptop/freefall/
Dfreefall.c42 int fd = open(unload_heads_path, O_RDONLY); in valid_disk()
125 fd = open("/dev/freefall", O_RDONLY); in main()
/Linux-v5.10/tools/testing/selftests/powerpc/
Dutils.c34 fd = open("/proc/self/auxv", O_RDONLY); in read_auxv()
149 if ((fd = open(path, O_RDONLY)) < 0) in read_sysfs_file()
171 if ((fd = open(path, O_RDONLY)) < 0) in read_debugfs_file()
/Linux-v5.10/tools/bpf/bpftool/
Dcgroup.c192 cgroup_fd = open(path, O_RDONLY); in do_show()
251 cgroup_fd = open(fpath, O_RDONLY); in do_show_tree_fn()
392 cgroup_fd = open(argv[0], O_RDONLY); in do_attach()
450 cgroup_fd = open(argv[0], O_RDONLY); in do_detach()
/Linux-v5.10/kernel/power/
Duser.c70 if ((filp->f_flags & O_ACCMODE) == O_RDONLY) { in snapshot_open()
73 data->mode = O_RDONLY; in snapshot_open()
122 pm_notifier_call_chain(data->mode == O_RDONLY ? in snapshot_release()
291 if (data->mode != O_RDONLY || !data->frozen || data->ready) { in snapshot_ioctl()
/Linux-v5.10/tools/testing/selftests/pidfd/
Dpidfd_setns_test.c93 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens()
144 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
237 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
250 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
263 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
311 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()
/Linux-v5.10/tools/testing/selftests/kvm/lib/
Delf.c22 fd = open(filename, O_RDONLY); in elfhdr_get()
122 fd = open(filename, O_RDONLY); in kvm_vm_elf_load()
/Linux-v5.10/fs/ecryptfs/
Dkthread.c133 flags |= IS_RDONLY(d_inode(lower_dentry)) ? O_RDONLY : O_RDWR; in ecryptfs_privileged_open()
137 if ((flags & O_ACCMODE) == O_RDONLY) { in ecryptfs_privileged_open()
/Linux-v5.10/tools/power/cpupower/utils/helpers/
Dsysfs.c23 fd = open(path, O_RDONLY); in sysfs_read_file()
70 fd = open(path, O_RDONLY); in sysfs_is_cpu_online()
134 fd = open(path, O_RDONLY); in sysfs_idlestate_read_file()

12345678910>>...12