Searched refs:fd (Results 51 - 75 of 1405) sorted by relevance

1234567891011>>

/linux-master/tools/perf/tests/
H A Dbp_account.c44 int fd; local
61 fd = sys_perf_event_open(attr, -1, 0, -1,
63 if (fd < 0) {
68 return fd;
84 int i, fd[wp_cnt], fd_wp, ret; local
87 fd[i] = wp_event((void *)&the_var, &attr);
88 TEST_ASSERT_VAL("failed to create wp\n", fd[i] != -1);
96 ret = ioctl(fd[0], PERF_EVENT_IOC_MODIFY_ATTRIBUTES, &attr_mod);
108 close(fd[i]);
117 int fd[10 local
140 int fd, ret = 1; local
154 int i, *fd = NULL, ret = -1; local
[all...]
/linux-master/tools/testing/selftests/wireguard/qemu/
H A Dinit.c61 int bits = 256, fd; local
66 fd = open("/dev/random", O_WRONLY);
67 if (fd < 0)
69 if (ioctl(fd, RNDADDTOENTCNT, &bits) < 0)
71 close(fd);
106 if (symlink("/proc/self/fd", "/dev/fd"))
107 panic("fd symlink");
112 int fd; local
114 fd
164 int status, fd; local
219 int fd = open("/dev/console", O_RDWR); local
236 int fd; local
248 int fd; local
[all...]
/linux-master/fs/jffs2/
H A Dbuild.c56 struct jffs2_full_dirent *fd; local
61 for(fd = ic->scan_dents; fd; fd = fd->next) {
63 if (!fd->ino)
68 child_ic = jffs2_get_ino_cache(c, fd->ino);
71 fd->name, fd->ino, ic->ino);
72 jffs2_mark_node_obsolete(c, fd
103 struct jffs2_full_dirent *fd; local
247 struct jffs2_full_dirent *fd; local
[all...]
/linux-master/arch/um/drivers/
H A Dvector_user.h84 extern int uml_vector_recvmsg(int fd, void *hdr, int flags);
85 extern int uml_vector_sendmsg(int fd, void *hdr, int flags);
86 extern int uml_vector_writev(int fd, void *hdr, int iovcount);
88 int fd, void *msgvec,
93 int fd,
100 extern int uml_vector_attach_bpf(int fd, void *bpf);
101 extern int uml_vector_detach_bpf(int fd, void *bpf);
102 extern bool uml_raw_enable_qdisc_bypass(int fd);
103 extern bool uml_raw_enable_vnet_headers(int fd);
104 extern bool uml_tap_enable_vnet_headers(int fd);
[all...]
H A Dport_kern.c24 int fd; member in struct:port_list
38 int fd; member in struct:connection
48 int fd; local
50 fd = os_rcv_fd(conn->socket[0], &conn->helper_pid);
51 if (fd < 0) {
52 if (fd == -EAGAIN)
56 -fd);
57 os_close_file(conn->fd);
62 conn->fd = fd;
79 int fd, socket[2], pid; local
163 int fd; local
228 int fd; local
[all...]
H A Dcow_sys.h26 static inline int cow_seek_file(int fd, __u64 offset) argument
28 return os_seek_file(fd, offset);
36 static inline int cow_write_file(int fd, void *buf, int size) argument
38 return os_write_file(fd, buf, size);
/linux-master/tools/perf/util/
H A Dcloexec.c24 int fd; local
40 fd = sys_perf_event_open(&attr, pid, cpu, -1,
42 if (fd < 0 && pid == -1 && errno == EACCES) {
50 if (fd >= 0) {
51 close(fd);
61 fd = sys_perf_event_open(&attr, pid, cpu, -1, 0);
62 if (fd < 0 && pid == -1 && errno == EACCES) {
70 if (fd >= 0)
71 close(fd);
73 if (WARN_ONCE(fd <
[all...]
/linux-master/tools/testing/selftests/openat2/
H A Dhelpers.c49 int fd = openat(dfd, path, O_CREAT, 0700); local
50 if (fd >= 0)
51 close(fd);
52 return fd;
55 char *fdreadlink(int fd) argument
59 E_asprintf(&tmp, "/proc/self/fd/%d", fd);
71 bool fdequal(int fd, int dfd, const char *path) argument
76 fdpath = fdreadlink(fd);
99 int fd; local
[all...]
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dobj_name.c27 int fd; local
39 fd = syscall(__NR_bpf, BPF_PROG_LOAD, &attr, sizeof(attr));
40 CHECK((tests[i].success && fd < 0) ||
41 (!tests[i].success && fd >= 0) ||
44 "fd %d(%d) errno %d(%d)\n",
45 fd, tests[i].success, errno, tests[i].expected_errno);
47 if (fd >= 0)
48 close(fd);
60 fd = syscall(__NR_bpf, BPF_MAP_CREATE, &attr, sizeof(attr));
61 CHECK((tests[i].success && fd <
[all...]
H A Dflow_dissector_load_bytes.c28 int fd, err; local
39 fd = bpf_test_load_program(BPF_PROG_TYPE_FLOW_DISSECTOR, prog,
41 ASSERT_GE(fd, 0, "bpf_test_load_program good fd");
43 err = bpf_prog_test_run_opts(fd, &topts);
49 if (fd >= -1)
50 close(fd);
/linux-master/drivers/net/ethernet/freescale/dpaa/
H A Ddpaa_eth_trace.h33 const struct qm_fd *fd),
36 TP_ARGS(netdev, fq, fd),
55 __entry->fd_addr = qm_fd_addr_get64(fd);
56 __entry->fd_format = qm_fd_get_format(fd);
57 __entry->fd_offset = qm_fd_get_offset(fd);
58 __entry->fd_length = qm_fd_get_length(fd);
59 __entry->fd_status = fd->status;
64 TP_printk("[%s] fqid=%d, fd: addr=0x%llx, format=%s, off=%u, len=%u, status=0x%08x",
74 /* Tx (egress) fd */
79 const struct qm_fd *fd),
[all...]
/linux-master/tools/testing/selftests/media_tests/
H A Dvideo_device_test.c42 int priority_test(int fd) argument
50 ret = ioctl(fd, VIDIOC_G_PRIORITY, &old_priority);
56 ret = ioctl(fd, VIDIOC_S_PRIORITY, &new_priority);
61 ret = ioctl(fd, VIDIOC_G_PRIORITY, &priority_to_compare);
73 ret = ioctl(fd, VIDIOC_S_PRIORITY, &old_priority);
81 int loop_test(int fd) argument
99 ret = ioctl(fd, VIDIOC_QUERYCAP, &vcap);
105 ret = ioctl(fd, VIDIOC_G_TUNER, &vtuner);
121 int fd; local
143 fd
[all...]
/linux-master/tools/testing/selftests/sync/
H A Dsync.c58 int sync_wait(int fd, int timeout) argument
62 fds.fd = fd;
84 static struct sync_file_info *sync_file_info(int fd) argument
94 err = ioctl(fd, SYNC_IOC_FILE_INFO, info);
114 err = ioctl(fd, SYNC_IOC_FILE_INFO, info);
131 int sync_fence_size(int fd) argument
134 struct sync_file_info *info = sync_file_info(fd);
146 int sync_fence_count_with_status(int fd, int status) argument
150 struct sync_file_info *info = sync_file_info(fd);
171 sw_sync_timeline_inc(int fd, unsigned int count) argument
178 sw_sync_timeline_is_valid(int fd) argument
189 sw_sync_timeline_destroy(int fd) argument
195 sw_sync_fence_create(int fd, const char *name, unsigned int value) argument
211 sw_sync_fence_is_valid(int fd) argument
217 sw_sync_fence_destroy(int fd) argument
[all...]
/linux-master/include/linux/
H A Dfdtable.h21 * The default fd array needs to be at least BITS_PER_LONG,
29 struct file __rcu **fd; /* current fd array */ member in struct:fdtable
36 static inline bool close_on_exec(unsigned int fd, const struct fdtable *fdt) argument
38 return test_bit(fd, fdt->close_on_exec);
41 static inline bool fd_is_open(unsigned int fd, const struct fdtable *fdt) argument
43 return test_bit(fd, fdt->open_fds);
81 * The caller must ensure that fd table isn't shared or hold rcu or file lock
83 static inline struct file *files_lookup_fd_raw(struct files_struct *files, unsigned int fd) argument
86 unsigned long mask = array_index_mask_nospec(fd, fd
99 files_lookup_fd_locked(struct files_struct *files, unsigned int fd) argument
[all...]
/linux-master/tools/testing/selftests/kvm/lib/
H A Delf.c20 int fd; local
21 fd = open(filename, O_RDONLY);
22 TEST_ASSERT(fd >= 0, "Failed to open ELF file,\n"
24 " rv: %i errno: %i", filename, fd, errno);
34 test_read(fd, ident, sizeof(ident));
79 offset_rv = lseek(fd, 0, SEEK_SET);
82 test_read(fd, hdrp, sizeof(*hdrp));
93 close(fd);
120 int fd; local
121 fd
[all...]
/linux-master/tools/testing/selftests/splice/
H A Dsplice_read.c14 int fd; local
23 fd = open(argv[1], O_RDONLY);
24 if (fd < 0) {
34 if (fstat(fd, &statbuf) < 0) {
48 spliced = splice(fd, NULL, STDOUT_FILENO, NULL,
55 close(fd);
/linux-master/tools/testing/selftests/proc/
H A Dproc-loadavg-001.c41 int fd; local
44 fd = open("/proc/loadavg" , O_RDONLY);
45 if (fd == -1)
47 rv = read(fd, buf, sizeof(buf));
64 lseek(fd, 0, SEEK_SET);
65 rv = read(fd, buf, sizeof(buf));
/linux-master/tools/testing/selftests/bpf/
H A Dflow_dissector_load.h20 int ret, fd, i; local
55 fd = bpf_program__fd(prog);
56 if (fd < 0)
57 return fd;
59 if (fd != *prog_fd) {
60 bpf_map_update_elem(prog_array_fd, &i, &fd, BPF_ANY);
/linux-master/arch/um/kernel/
H A Dload_file.c12 int fd, n; local
14 fd = os_open_file(filename, of_read(OPENFLAGS()), 0);
15 if (fd < 0) {
17 -fd);
20 n = os_read_file(fd, buf, size);
28 os_close_file(fd);
/linux-master/arch/um/include/shared/
H A Dnet_user.h37 extern void read_output(int fd, char *output_out, int len);
39 extern int net_read(int fd, void *buf, int len);
40 extern int net_recvfrom(int fd, void *buf, int len);
41 extern int net_write(int fd, void *buf, int len);
42 extern int net_send(int fd, void *buf, int len);
43 extern int net_sendto(int fd, void *buf, int len, void *to, int sock_len);
/linux-master/fs/
H A Dfile.c7 * Manage the dynamic fd arrays in the process files_struct.
36 kvfree(fdt->fd);
50 * Copy 'count' fd bits from the old table to the new table and clear the extra
84 memcpy(nfdt->fd, ofdt->fd, cpy);
85 memset((char *)nfdt->fd + cpy, 0, set);
139 fdt->fd = data;
155 kvfree(fdt->fd);
164 * This function will allocate a new fdtable and both fd array and fdset, of
249 static inline void __set_close_on_exec(unsigned int fd, struc argument
254 __clear_close_on_exec(unsigned int fd, struct fdtable *fdt) argument
260 __set_open_fd(unsigned int fd, struct fdtable *fdt) argument
268 __clear_open_fd(unsigned int fd, struct fdtable *fdt) argument
502 unsigned int fd; local
568 __put_unused_fd(struct files_struct *files, unsigned int fd) argument
576 put_unused_fd(unsigned int fd) argument
602 fd_install(unsigned int fd, struct file *file) argument
642 file_close_fd_locked(struct files_struct *files, unsigned fd) argument
661 close_fd(unsigned fd) argument
689 __range_cloexec(struct files_struct *cur_fds, unsigned int fd, unsigned int max_fd) argument
703 __range_close(struct files_struct *files, unsigned int fd, unsigned int max_fd) argument
739 __close_range(unsigned fd, unsigned max_fd, unsigned int flags) argument
810 file_close_fd(unsigned int fd) argument
831 unsigned fd = i * BITS_PER_LONG; local
954 __fget_files_rcu(struct files_struct *files, unsigned int fd, fmode_t mask) argument
1030 __fget_files(struct files_struct *files, unsigned int fd, fmode_t mask) argument
1042 __fget(unsigned int fd, fmode_t mask) argument
1047 fget(unsigned int fd) argument
1053 fget_raw(unsigned int fd) argument
1059 fget_task(struct task_struct *task, unsigned int fd) argument
1071 lookup_fdget_rcu(unsigned int fd) argument
1078 task_lookup_fdget_rcu(struct task_struct *task, unsigned int fd) argument
1097 unsigned int fd = *ret_fd; local
1131 __fget_light(unsigned int fd, fmode_t mask) argument
1157 __fdget(unsigned int fd) argument
1163 __fdget_raw(unsigned int fd) argument
1184 __fdget_pos(unsigned int fd) argument
1207 set_close_on_exec(unsigned int fd, int flag) argument
1220 get_close_on_exec(unsigned int fd) argument
1276 replace_fd(unsigned fd, struct file *file, unsigned flags) argument
[all...]
/linux-master/arch/csky/kernel/
H A Dsyscall.c22 unsigned long, fd,
28 return ksys_mmap_pgoff(addr, len, prot, flags, fd,
37 int, fd,
42 return ksys_fadvise64_64(fd, offset, len, advice);
/linux-master/tools/leds/
H A Dled_hw_brightness_mon.c28 int fd, ret; local
42 fd = open(brightness_file_path, O_RDONLY);
43 if (fd == -1) {
53 read(fd, buf, sizeof(buf));
55 pollfd.fd = fd;
69 ret = read(fd, buf, sizeof(buf));
73 ret = lseek(pollfd.fd, 0, SEEK_SET);
82 close(fd);
/linux-master/tools/spi/
H A Dspidev_fdx.c18 static void do_read(int fd, int len) argument
30 status = read(fd, buf, len);
49 static void do_msg(int fd, int len) argument
68 status = ioctl(fd, SPI_IOC_MESSAGE(2), xfer);
80 static void dumpstat(const char *name, int fd) argument
85 if (ioctl(fd, SPI_IOC_RD_MODE32, &mode) < 0) {
89 if (ioctl(fd, SPI_IOC_RD_LSB_FIRST, &lsb) < 0) {
93 if (ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits) < 0) {
97 if (ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed) < 0) {
111 int fd; local
[all...]
/linux-master/tools/testing/selftests/filesystems/
H A Ddnotify_test.c19 int fd; local
26 fd = open(".", O_RDONLY);
27 fcntl(fd, F_SETSIG, SIGRTMIN + 1);
28 fcntl(fd, F_NOTIFY, DN_MODIFY|DN_CREATE|DN_MULTISHOT);
33 printf("Got event on fd=%d\n", event_fd);

Completed in 202 milliseconds

1234567891011>>