Searched refs:fd (Results 201 - 225 of 1405) sorted by relevance

1234567891011>>

/linux-master/tools/testing/selftests/mm/
H A Dvm_util.c20 uint64_t pagemap_get_entry(int fd, char *start) argument
26 ret = pread(fd, &entry, sizeof(entry), pfn * sizeof(entry));
32 static uint64_t __pagemap_scan_get_categories(int fd, char *start, struct page_region *r) argument
50 return ioctl(fd, PAGEMAP_SCAN, &arg);
53 static uint64_t pagemap_scan_get_categories(int fd, char *start) argument
58 ret = __pagemap_scan_get_categories(fd, start, &r);
67 static bool pagemap_scan_supported(int fd, char *start) argument
76 ret = __pagemap_scan_get_categories(fd, start, (struct page_region *) ~0UL);
85 static bool page_entry_is(int fd, char *start, char *desc, argument
88 bool m = pagemap_get_entry(fd, star
102 pagemap_is_softdirty(int fd, char *start) argument
108 pagemap_is_swapped(int fd, char *start) argument
113 pagemap_is_populated(int fd, char *start) argument
120 pagemap_get_pfn(int fd, char *start) argument
134 int fd = open("/proc/self/clear_refs", O_WRONLY); local
155 int fd; local
[all...]
H A Dsplit_huge_page_test.c58 int fd; local
61 fd = open(path, O_WRONLY);
62 if (fd == -1)
65 numwritten = write(fd, buf, buflen - 1);
66 close(fd);
207 int fd; local
226 fd = open(testfile, O_CREAT|O_WRONLY, 0664);
227 if (fd == -1) {
233 num_written = write(fd, tmpfs_loc, strlen(tmpfs_loc) + 1);
234 close(fd);
299 create_pagecache_thp_and_fd(const char *testfile, size_t fd_size, int *fd, char **addr) argument
364 int fd; local
[all...]
/linux-master/tools/laptop/dslm/
H A Ddslm.c29 static int check_powermode(int fd) argument
34 if (ioctl(fd, HDIO_DRIVE_CMD, &args)
36 && ioctl(fd, HDIO_DRIVE_CMD, &args)) {
66 static void measure(int fd) argument
83 last_state = check_powermode(fd);
89 curr_state = check_powermode(fd);
134 int fd; local
147 if (!(fd = open(disk, O_RDONLY|O_NONBLOCK))) {
161 measure(fd);
163 close(fd);
[all...]
/linux-master/arch/s390/kernel/
H A Dcompat_linux.h82 long compat_sys_s390_ftruncate64(unsigned int fd, u32 high, u32 low);
83 long compat_sys_s390_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, u32 high, u32 low);
84 long compat_sys_s390_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count, u32 high, u32 low);
85 long compat_sys_s390_readahead(int fd, u32 high, u32 low, s32 count);
88 long compat_sys_s390_fstat64(unsigned int fd, struct stat64_emu31 __user *statbuf);
92 long compat_sys_s390_read(unsigned int fd, char __user *buf, compat_size_t count);
93 long compat_sys_s390_write(unsigned int fd, const char __user *buf, compat_size_t count);
94 long compat_sys_s390_fadvise64(int fd, u32 high, u32 low, compat_size_t len, int advise);
96 long compat_sys_s390_sync_file_range(int fd, u32 offhigh, u32 offlow, u32 nhigh, u32 nlow, unsigned int flags);
97 long compat_sys_s390_fallocate(int fd, in
[all...]
/linux-master/arch/powerpc/kernel/
H A Dsyscalls.c41 unsigned long fd, unsigned long off, int shift)
49 return ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> shift);
54 unsigned long, fd, unsigned long, pgoff)
56 return do_mmap2(addr, len, prot, flags, fd, pgoff, PAGE_SHIFT-12);
63 unsigned long, fd, unsigned long, off_4k)
65 return do_mmap2(addr, len, prot, flags, fd, off_4k, PAGE_SHIFT-12);
71 unsigned long, fd, off_t, offset)
73 return do_mmap2(addr, len, prot, flags, fd, offset, PAGE_SHIFT);
104 int, fd, int, advice, u32, offset_high, u32, offset_low,
107 return ksys_fadvise64_64(fd, merge_6
39 do_mmap2(unsigned long addr, size_t len, unsigned long prot, unsigned long flags, unsigned long fd, unsigned long off, int shift) argument
[all...]
H A Dsys_ppc32.c71 unsigned int, fd,
75 return ksys_pread64(fd, ubuf, count, merge_64(pos1, pos2));
79 unsigned int, fd,
83 return ksys_pwrite64(fd, ubuf, count, merge_64(pos1, pos2));
87 int, fd, u32, r4,
90 return ksys_readahead(fd, merge_64(offset1, offset2), count);
101 unsigned int, fd, u32, reg4,
104 return ksys_ftruncate(fd, merge_64(len1, len2));
108 int, fd, u32, unused, u32, offset1, u32, offset2,
111 return ksys_fadvise64_64(fd, merge_6
[all...]
/linux-master/tools/testing/selftests/filelock/
H A Dofdlocks.c11 static int lock_set(int fd, struct flock *fl) argument
17 ret = fcntl(fd, F_OFD_SETLK, fl);
23 static int lock_get(int fd, struct flock *fl) argument
29 ret = fcntl(fd, F_OFD_GETLK, fl);
39 int fd = open("/tmp/aa", O_RDWR | O_CREAT | O_EXCL, 0600); local
43 assert(fd != -1);
45 ksft_print_msg("[INFO] opened fds %i %i\n", fd, fd2);
51 rc = lock_set(fd, &fl);
54 ("[SUCCESS] set OFD read lock on first fd\n");
56 ksft_print_msg("[FAIL] to set OFD read lock on first fd\
[all...]
/linux-master/tools/testing/selftests/firmware/
H A Dfw_namespace.c37 int fd; local
39 fd = open(sys_path, O_WRONLY);
40 if (fd < 0)
43 if (write(fd, fw_name, strlen(fw_name)) != strlen(fw_name))
45 close(fd);
50 int fd; local
53 fd = open(fw_path, O_WRONLY | O_CREAT, 0600);
54 if (fd < 0)
57 if (write(fd, fw, sizeof(fw) -1) != sizeof(fw) -1)
60 close(fd);
[all...]
/linux-master/tools/testing/selftests/net/
H A Dtcp_fastopen_backup_key.c49 static void get_keys(int fd, uint32_t *keys) argument
55 if (getsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys, &len))
67 static void set_keys(int fd, uint32_t *keys) argument
72 if (setsockopt(fd, SOL_TCP, TCP_FASTOPEN_KEY, keys,
148 int fd, sz, ret; local
187 fd = socket(family, proto, 0);
188 if (fd < 0)
190 if (bind(fd, saddr, sz))
193 ret = sendto(fd, data, 1, MSG_FASTOPEN, daddr, sz);
197 return fd;
200 is_listen_fd(int fd) argument
211 rotate_key(int fd) argument
247 int fd, epfd; local
[all...]
H A Dpsock_snd.c170 static void do_bind(int fd) argument
180 if (bind(fd, (void *)&laddr, sizeof(laddr)))
184 static void do_send(int fd, char *buf, int len) argument
198 ret = write(fd, buf, len);
207 ret = sendto(fd, buf, len, 0, (void *)&laddr, sizeof(laddr));
221 int fd, len; local
223 fd = socket(PF_PACKET, cfg_use_dgram ? SOCK_DGRAM : SOCK_RAW, 0);
224 if (fd == -1)
228 do_bind(fd);
231 setsockopt(fd, SOL_PACKE
255 int fd; local
274 do_rx(int fd, int expected_len, char *expected) argument
293 int fd; local
[all...]
H A Dudpgso_bench_rx.c92 static void do_poll(int fd, int timeout_ms) argument
99 pfd.fd = fd;
128 int fd, val; local
130 fd = socket(cfg_family, cfg_tcp ? SOCK_STREAM : SOCK_DGRAM, 0);
131 if (fd == -1)
135 if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, sizeof(val)))
138 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &val, sizeof(val)))
141 if (bind(fd, (void *)&cfg_bind_addr, cfg_alen))
145 int accept_fd = fd;
165 do_flush_tcp(int fd) argument
215 recv_msg(int fd, char *buf, int len, int *gso_size) argument
248 do_flush_udp(int fd) argument
358 int fd; local
[all...]
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dcgroup_link.c31 int fd; member in struct:__anon3581
56 cgs[i].fd = create_and_get_cgroup(cgs[i].path);
57 if (!ASSERT_GE(cgs[i].fd, 0, "cg_create"))
67 cgs[i].fd);
75 err = bpf_prog_query(cgs[0].fd, BPF_CGROUP_INET_EGRESS,
83 err = bpf_prog_query(cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS,
92 err = bpf_prog_query(cgs[last_cg].fd, BPF_CGROUP_INET_EGRESS,
112 err = bpf_prog_attach(prog_fd, cgs[last_cg].fd,
119 cgs[last_cg].fd);
130 err = bpf_prog_detach2(prog_fd, cgs[last_cg].fd, BPF_CGROUP_INET_EGRES
[all...]
H A Dhtab_reuse.c10 int fd; member in struct:htab_op_ctx
31 bpf_map_lookup_elem_flags(ctx->fd, &key, &value, BPF_F_LOCK);
49 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK);
50 bpf_map_delete_elem(ctx->fd, &key);
55 bpf_map_update_elem(ctx->fd, &key, &value, BPF_F_LOCK);
56 bpf_map_delete_elem(ctx->fd, &key);
74 ctx.fd = bpf_map__fd(skel->maps.htab);
/linux-master/tools/power/acpi/tools/acpidbg/
H A Dacpidbg.c97 static int acpi_aml_set_fl(int fd, int flags) argument
101 ret = fcntl(fd, F_GETFL, 0);
107 ret = fcntl(fd, F_SETFL, flags);
115 static int acpi_aml_set_fd(int fd, int maxfd, fd_set *set) argument
117 if (fd > maxfd)
118 maxfd = fd;
119 FD_SET(fd, set);
123 static int acpi_aml_read(int fd, struct circ_buf *crc) argument
130 len = read(fd, p, len);
159 static int acpi_aml_read_batch_log(int fd, struc argument
223 acpi_aml_write(int fd, struct circ_buf *crc) argument
238 acpi_aml_write_batch_log(int fd, struct circ_buf *crc) argument
255 acpi_aml_write_batch_cmd(int fd, struct circ_buf *crc) argument
265 acpi_aml_loop(int fd) argument
336 acpi_aml_readable(int fd) argument
360 acpi_aml_flush(int fd) argument
381 int fd = -1; local
[all...]
/linux-master/drivers/staging/greybus/Documentation/firmware/
H A Dfirmware.c40 static int update_intf_firmware(int fd) argument
47 ret = ioctl(fd, FW_MGMT_IOC_GET_INTF_FW, &intf_fw_info);
69 ret = ioctl(fd, FW_MGMT_IOC_INTF_LOAD_AND_VALIDATE, &intf_load);
90 ret = ioctl(fd, FW_MGMT_IOC_MODE_SWITCH);
97 static int update_backend_firmware(int fd) argument
108 ret = ioctl(fd, FW_MGMT_IOC_GET_BACKEND_FW, &backend_fw_info);
138 ret = ioctl(fd, FW_MGMT_IOC_INTF_BACKEND_FW_UPDATE, &backend_update);
162 int fd, ret; local
193 fd = open(fwdev, O_RDWR);
194 if (fd <
[all...]
/linux-master/arch/um/drivers/
H A Ddaemon_user.c54 int fd, n, err; local
72 fd = socket(AF_UNIX, SOCK_DGRAM, 0);
73 if (fd < 0) {
79 if (bind(fd, (struct sockaddr *) local_addr, sizeof(*local_addr)) < 0) {
115 return fd;
120 close(fd);
145 pri->fd = connect_to_switch(pri);
146 if (pri->fd < 0) {
149 return pri->fd;
158 return pri->fd;
178 daemon_user_write(int fd, void *buf, int len, struct daemon_data *pri) argument
[all...]
/linux-master/drivers/clk/imx/
H A Dclk-composite-7ulp.c75 struct clk_fractional_divider *fd = NULL; local
94 fd = kzalloc(sizeof(*fd), GFP_KERNEL);
95 if (!fd) {
99 fd_hw = &fd->hw;
100 fd->reg = reg;
101 fd->mshift = PCG_FRAC_SHIFT;
102 fd->mwidth = PCG_FRAC_WIDTH;
103 fd->nshift = PCG_PCD_SHIFT;
104 fd
[all...]
/linux-master/tools/perf/util/
H A Dprobe-file.h20 int fd; member in struct:probe_cache
43 struct strlist *probe_file__get_namelist(int fd);
44 struct strlist *probe_file__get_rawlist(int fd);
45 int probe_file__add_event(int fd, struct probe_trace_event *tev);
47 int probe_file__del_events(int fd, struct strfilter *filter);
48 int probe_file__get_events(int fd, struct strfilter *filter,
50 int probe_file__del_strlist(int fd, struct strlist *namelist);
/linux-master/tools/gpio/
H A Dgpio-watch.c28 int fd, i, j, ret; local
35 fd = open(argv[1], O_RDWR | O_CLOEXEC);
36 if (fd < 0) {
48 ret = ioctl(fd, GPIO_V2_GET_LINEINFO_WATCH_IOCTL, &req);
55 pfd.fd = fd;
61 perror("error polling the linechanged fd");
65 rd = read(pfd.fd, &chg, sizeof(chg));
/linux-master/fs/hostfs/
H A Dhostfs.h71 extern int stat_file(const char *path, struct hostfs_stat *p, int fd);
80 extern int replace_file(int oldfd, int fd);
82 extern int read_file(int fd, unsigned long long *offset, char *buf, int len);
83 extern int write_file(int fd, unsigned long long *offset, const char *buf,
85 extern int lseek_file(int fd, long long offset, int whence);
86 extern int fsync_file(int fd, int datasync);
88 extern int set_attr(const char *file, struct hostfs_iattr *attrs, int fd);
/linux-master/fs/hfs/
H A Ddir.c24 struct hfs_find_data fd; local
28 res = hfs_find_init(HFS_SB(dir->i_sb)->cat_tree, &fd);
31 hfs_cat_build_key(dir->i_sb, fd.search_key, dir->i_ino, &dentry->d_name);
32 res = hfs_brec_read(&fd, &rec, sizeof(rec));
37 inode = hfs_iget(dir->i_sb, &fd.search_key->cat, &rec);
41 hfs_find_exit(&fd);
55 struct hfs_find_data fd; local
62 err = hfs_find_init(HFS_SB(sb)->cat_tree, &fd);
65 hfs_cat_build_key(sb, fd.search_key, inode->i_ino, NULL);
66 err = hfs_brec_find(&fd);
[all...]
H A Dcatalog.c84 struct hfs_find_data fd; local
96 err = hfs_find_init(HFS_SB(sb)->cat_tree, &fd);
104 err = hfs_bmap_reserve(fd.tree, 2 * fd.tree->depth);
108 hfs_cat_build_key(sb, fd.search_key, cnid, NULL);
112 err = hfs_brec_find(&fd);
118 err = hfs_brec_insert(&fd, &entry, entry_size);
122 hfs_cat_build_key(sb, fd.search_key, dir->i_ino, str);
124 err = hfs_brec_find(&fd);
131 err = hfs_brec_insert(&fd,
187 hfs_cat_find_brec(struct super_block *sb, u32 cnid, struct hfs_find_data *fd) argument
224 struct hfs_find_data fd; local
[all...]
/linux-master/tools/testing/selftests/iommu/
H A Diommufd_utils.h61 ioctl(self->fd, \
66 static int _test_cmd_mock_domain(int fd, unsigned int ioas_id, __u32 *stdev_id, argument
77 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd);
90 ASSERT_EQ(0, _test_cmd_mock_domain(self->fd, ioas_id, stdev_id, \
93 EXPECT_ERRNO(_errno, _test_cmd_mock_domain(self->fd, ioas_id, \
96 static int _test_cmd_mock_domain_flags(int fd, unsigned int ioas_id, argument
108 ret = ioctl(fd, IOMMU_TEST_CMD, &cmd);
121 ASSERT_EQ(0, _test_cmd_mock_domain_flags(self->fd, ioas_id, flags, \
125 _test_cmd_mock_domain_flags(self->fd, ioas_id, flags, \
128 static int _test_cmd_mock_domain_replace(int fd, __u3 argument
156 _test_cmd_hwpt_alloc(int fd, __u32 device_id, __u32 pt_id, __u32 flags, __u32 *hwpt_id, __u32 data_type, void *data, size_t data_len) argument
222 _test_cmd_hwpt_invalidate(int fd, __u32 hwpt_id, void *reqs, uint32_t data_type, uint32_t lreq, uint32_t *nreqs) argument
253 _test_cmd_access_replace_ioas(int fd, __u32 access_id, unsigned int ioas_id) argument
272 _test_cmd_set_dirty_tracking(int fd, __u32 hwpt_id, bool enabled) argument
289 _test_cmd_get_dirty_bitmap(int fd, __u32 hwpt_id, size_t length, __u64 iova, size_t page_size, __u64 *bitmap, __u32 flags) argument
315 _test_cmd_mock_domain_set_dirty(int fd, __u32 hwpt_id, size_t length, __u64 iova, size_t page_size, __u64 *bitmap, __u64 *dirty) argument
346 _test_mock_dirty_bitmaps(int fd, __u32 hwpt_id, size_t length, __u64 iova, size_t page_size, size_t pte_page_size, __u64 *bitmap, __u64 bitmap_size, __u32 flags, struct __test_metadata *_metadata) argument
[all...]
/linux-master/tools/testing/selftests/bpf/
H A Dnetwork_helpers.c55 int settimeo(int fd, int timeout_ms) argument
64 if (setsockopt(fd, SOL_SOCKET, SO_RCVTIMEO, &timeout,
70 if (setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, &timeout,
79 #define save_errno_close(fd) ({ int __save = errno; close(fd); errno = __save; })
85 int fd; local
87 fd = socket(addr->sa_family, type, protocol);
88 if (fd < 0) {
93 if (settimeo(fd, timeout_ms))
97 setsockopt(fd, SOL_SOCKE
203 int fd, ret; local
234 connect_fd_to_addr(int fd, const struct sockaddr_storage *addr, socklen_t addrlen, const bool must_fail) argument
263 int fd; local
288 int fd, type, protocol; local
[all...]
/linux-master/tools/testing/vsock/
H A Dvsock_perf.c89 static void vsock_increase_buf_size(int fd) argument
91 if (setsockopt(fd, AF_VSOCK, SO_VM_SOCKETS_BUFFER_MAX_SIZE,
95 if (setsockopt(fd, AF_VSOCK, SO_VM_SOCKETS_BUFFER_SIZE,
112 int fd; local
114 fd = socket(AF_VSOCK, SOCK_STREAM, 0);
116 if (fd < 0) {
121 if (connect(fd, &addr.sa, sizeof(addr.svm)) < 0) {
123 close(fd);
127 return fd;
144 int fd; local
261 int fd; local
[all...]

Completed in 178 milliseconds

1234567891011>>