Searched refs:proc_fd (Results 1 – 5 of 5) sorted by relevance
/linux/tools/testing/selftests/net/ |
H A D | tcp_fastopen_backup_key.c | 44 static int proc_fd; variable 59 lseek(proc_fd, 0, SEEK_SET); in get_keys() 60 if (read(proc_fd, buf, sizeof(buf)) <= 0) in get_keys() 84 lseek(proc_fd, 0, SEEK_SET); in set_keys() 85 if (write(proc_fd, buf, sizeof(buf)) <= 0) in set_keys() 322 proc_fd = open(PROC_FASTOPEN_KEY, O_RDWR); in main() 323 if (proc_fd < 0) in main() 330 close(proc_fd); in main()
|
/linux/tools/testing/selftests/iommu/ |
H A D | iommufd_fail_nth.c | 88 int proc_fd; member 98 nth_state->proc_fd = open(buf, O_RDWR); in fail_nth_first() 99 ASSERT_NE(-1, nth_state->proc_fd); in fail_nth_first() 126 res = pread(nth_state->proc_fd, buf, sizeof(buf), 0); in fail_nth_next() 133 res2 = pwrite(nth_state->proc_fd, disable_nth, in fail_nth_next() 136 res2 = pwrite(nth_state->proc_fd, disable_nth, in fail_nth_next() 172 ASSERT_EQ(len, pwrite(nth_state->proc_fd, buf, len, 0)); in __fail_nth_enable()
|
/linux/tools/testing/selftests/pidfd/ |
H A D | pidfd_setns_test.c | 138 int i, proc_fd, ret; in FIXTURE_SETUP() local 151 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP() 152 ASSERT_GE(proc_fd, 0) { in FIXTURE_SETUP() 164 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 314 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP() 365 close(proc_fd); in FIXTURE_SETUP()
|
/linux/fs/proc/ |
H A D | fd.c | 37 unsigned int fd = proc_fd(m->private); in seq_show() 155 fd = proc_fd(inode); in tid_fd_revalidate() 181 unsigned int fd = proc_fd(d_inode(dentry)); in proc_fd_link()
|
H A D | fd.h | 16 static inline unsigned int proc_fd(struct inode *inode) in proc_fd() function
|