Searched refs:fd (Results 26 - 50 of 1405) sorted by relevance

1234567891011>>

/linux-master/fs/hfs/
H A Dbfind.c15 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) argument
19 fd->tree = tree;
20 fd->bnode = NULL;
24 fd->search_key = ptr;
25 fd->key = ptr + tree->max_key_len + 2;
44 void hfs_find_exit(struct hfs_find_data *fd) argument
46 hfs_bnode_put(fd->bnode);
47 kfree(fd->search_key);
49 fd->tree->cnid, __builtin_return_address(0));
50 mutex_unlock(&fd
55 __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd) argument
107 hfs_brec_find(struct hfs_find_data *fd) argument
161 hfs_brec_read(struct hfs_find_data *fd, void *rec, int rec_len) argument
174 hfs_brec_goto(struct hfs_find_data *fd, int cnt) argument
[all...]
/linux-master/tools/testing/selftests/efivarfs/
H A Dcreate-read.c16 int fd, rc; local
26 fd = open(path, O_RDWR | O_CREAT, 0600);
27 if (fd < 0) {
32 rc = read(fd, buf, sizeof(buf));
35 close(fd);
39 close(fd);
/linux-master/tools/testing/selftests/thermal/intel/workload_hint/
H A Dworkload_hint_test.c29 int fd; local
33 fd = open(WORKLOAD_ENABLE_ATTRIBUTE, O_RDWR);
34 if (fd < 0) {
39 if (write(fd, "0\n", 2) < 0) {
46 close(fd);
53 int fd, ret, index; local
73 fd = open(WORKLOAD_NOTIFICATION_DELAY_ATTRIBUTE, O_RDWR);
74 if (fd < 0) {
79 if (write(fd, delay_str, strlen(delay_str)) < 0) {
84 close(fd);
[all...]
/linux-master/tools/leds/
H A Duledmon.c25 int fd, ret; local
37 fd = open("/dev/uleds", O_RDWR);
38 if (fd == -1) {
43 ret = write(fd, &uleds_dev, sizeof(uleds_dev));
46 close(fd);
51 ret = read(fd, &brightness, sizeof(brightness));
54 close(fd);
61 close(fd);
/linux-master/arch/sh/include/asm/
H A Dsyscalls.h7 int fd, unsigned long off);
10 unsigned long fd, unsigned long pgoff);
/linux-master/tools/testing/selftests/arm64/bti/
H A Dsystem.c17 ssize_t write(int fd, const void *buf, size_t size) argument
19 return syscall(__NR_write, fd, buf, size);
/linux-master/include/linux/
H A Dfont.h67 #define REFCOUNT(fd) (((int *)(fd))[-1])
68 #define FNTSIZE(fd) (((int *)(fd))[-2])
69 #define FNTCHARCNT(fd) (((int *)(fd))[-3])
70 #define FNTSUM(fd) (((int *)(fd))[-4])
/linux-master/tools/testing/selftests/filesystems/eventfd/
H A Deventfd_test.c45 int fd, flags; local
47 fd = sys_eventfd2(0, 0);
48 ASSERT_GE(fd, 0);
50 flags = fcntl(fd, F_GETFL);
54 close(fd);
59 int fd, flags; local
61 fd = sys_eventfd2(0, EFD_CLOEXEC);
62 ASSERT_GE(fd, 0);
64 flags = fcntl(fd, F_GETFD);
68 close(fd);
73 int fd, flags; local
88 int fd, flags; local
113 verify_fdinfo(int fd, struct error *err, const char *prefix, size_t prefix_len, const char *expect, ...) argument
167 int fd, ret; local
[all...]
/linux-master/fs/hfsplus/
H A Dbfind.c15 int hfs_find_init(struct hfs_btree *tree, struct hfs_find_data *fd) argument
19 fd->tree = tree;
20 fd->bnode = NULL;
24 fd->search_key = ptr;
25 fd->key = ptr + tree->max_key_len + 2;
44 void hfs_find_exit(struct hfs_find_data *fd) argument
46 hfs_bnode_put(fd->bnode);
47 kfree(fd->search_key);
49 fd->tree->cnid, __builtin_return_address(0));
50 mutex_unlock(&fd
54 hfs_find_1st_rec_by_cnid(struct hfs_bnode *bnode, struct hfs_find_data *fd, int *begin, int *end, int *cur_rec) argument
92 hfs_find_rec_by_key(struct hfs_bnode *bnode, struct hfs_find_data *fd, int *begin, int *end, int *cur_rec) argument
114 __hfs_brec_find(struct hfs_bnode *bnode, struct hfs_find_data *fd, search_strategy_t rec_found) argument
164 hfs_brec_find(struct hfs_find_data *fd, search_strategy_t do_key_compare) argument
218 hfs_brec_read(struct hfs_find_data *fd, void *rec, int rec_len) argument
231 hfs_brec_goto(struct hfs_find_data *fd, int cnt) argument
[all...]
/linux-master/arch/um/drivers/
H A Dport.h12 extern int port_connection(int fd, int *socket_out, int *pid_out);
14 extern void port_read(int fd, void *data);
16 extern int port_rcv_fd(int fd);
H A Dchan_user.h34 extern void generic_close(int fd, void *unused);
35 extern int generic_read(int fd, __u8 *c_out, void *unused);
36 extern int generic_write(int fd, const __u8 *buf, size_t n, void *unused);
37 extern int generic_console_write(int fd, const char *buf, int n);
38 extern int generic_window_size(int fd, void *unused, unsigned short *rows_out,
43 extern void register_winch(int fd, struct tty_port *port);
44 extern void register_winch_irq(int fd, int tty_fd, int pid,
/linux-master/arch/xtensa/platforms/iss/include/platform/
H A Dsimcall.h39 static inline int simc_close(int fd) argument
41 return __simc(SYS_close, fd, 0, 0);
44 static inline int simc_ioctl(int fd, int request, void *arg) argument
47 return __simc(SYS_ioctl, fd, request, (int) arg);
54 static inline int simc_read(int fd, void *buf, size_t count) argument
56 return __simc(SYS_read, fd, (int) buf, count);
59 static inline int simc_write(int fd, const void *buf, size_t count) argument
61 return __simc(SYS_write, fd, (int) buf, count);
64 static inline int simc_poll(int fd) argument
69 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_REA
76 simc_lseek(int fd, uint32_t off, int whence) argument
[all...]
/linux-master/tools/lib/perf/include/internal/
H A Dlib.h9 ssize_t readn(int fd, void *buf, size_t n);
10 ssize_t writen(int fd, const void *buf, size_t n);
12 ssize_t preadn(int fd, void *buf, size_t n, off_t offs);
/linux-master/tools/testing/vsock/
H A Dvsock_test.c42 int fd; local
44 fd = socket(AF_VSOCK, SOCK_STREAM, 0);
48 ret = connect(fd, &addr.sa, sizeof(addr.svm));
62 close(fd);
78 int fd; local
83 fd = socket(AF_VSOCK, SOCK_STREAM, 0);
87 ret = connect(fd, &addr.sa, sizeof(addr.svm));
104 close(fd);
119 int fd; local
121 fd
139 int fd; local
153 int fd; local
174 int fd; local
195 int fd; local
266 int fd; local
295 int fd; local
364 int fd; local
433 int fd; local
505 int fd; local
522 int fd; local
572 int fd; local
621 int fd; local
638 int fd; local
672 int fd; local
690 int fd; local
725 int fd; local
808 int fd; local
840 int fd; local
906 int fd; local
941 int fd; local
987 int fd; local
1016 int fd; local
1070 test_stream_check_sigpipe(int fd) argument
1103 int fd; local
1131 int fd; local
1146 int fd; local
1171 int fd; local
1253 int fd; local
1289 int fd; local
[all...]
/linux-master/tools/testing/selftests/bpf/prog_tests/
H A Dfs_kfuncs.c18 int fd = -1, err; local
20 fd = open(testfile, O_CREAT | O_RDONLY, 0644);
21 if (!ASSERT_GE(fd, 0, "create_file"))
24 close(fd);
25 fd = -1;
49 fd = open(testfile, O_RDONLY, 0644);
50 if (!ASSERT_GE(fd, 0, "open_file"))
56 close(fd);
70 int fd, err; local
73 fd
[all...]
H A Dlibbpf_get_fd_by_id_opts.c18 int ret, zero = 0, fd = -1; local
37 fd = bpf_map_get_fd_by_id(info_m.id);
38 if (!ASSERT_LT(fd, 0, "bpf_map_get_fd_by_id"))
41 fd = bpf_map_get_fd_by_id_opts(info_m.id, NULL);
42 if (!ASSERT_LT(fd, 0, "bpf_map_get_fd_by_id_opts"))
45 fd = bpf_map_get_fd_by_id_opts(info_m.id, &fd_opts_rdonly);
46 if (!ASSERT_GE(fd, 0, "bpf_map_get_fd_by_id_opts"))
49 /* Map lookup should work with read-only fd. */
50 ret = bpf_map_lookup_elem(fd, &zero, &value);
57 /* Map update should not work with read-only fd
[all...]
/linux-master/tools/testing/selftests/mm/
H A Dgup_longterm.c38 static __fsword_t get_fs_type(int fd) argument
44 ret = fstatfs(fd, &fs);
91 static void do_test(int fd, size_t size, enum test_type type, bool shared) argument
93 __fsword_t fs_type = get_fs_type(fd);
98 if (ftruncate(fd, size)) {
103 if (fallocate(fd, 0, 0, size)) {
112 shared ? MAP_SHARED : MAP_PRIVATE, fd, 0);
234 typedef void (*test_fn)(int fd, size_t size);
238 int fd; local
242 fd
255 int fd; local
279 int fd; local
303 int fd; local
325 test_shared_rw_pin(int fd, size_t size) argument
330 test_shared_rw_fast_pin(int fd, size_t size) argument
335 test_shared_ro_pin(int fd, size_t size) argument
340 test_shared_ro_fast_pin(int fd, size_t size) argument
345 test_private_rw_pin(int fd, size_t size) argument
350 test_private_rw_fast_pin(int fd, size_t size) argument
355 test_private_ro_pin(int fd, size_t size) argument
360 test_private_ro_fast_pin(int fd, size_t size) argument
366 test_shared_iouring(int fd, size_t size) argument
371 test_private_iouring(int fd, size_t size) argument
[all...]
/linux-master/tools/testing/selftests/net/
H A Dreuseaddr_ports_exhausted.c58 int fd, ret; local
60 fd = socket(AF_INET, SOCK_STREAM, 0);
61 ASSERT_NE(-1, fd) TH_LOG("failed to open socket.");
63 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &reuseaddr, sizeof(int));
66 ret = setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &reuseport, sizeof(int));
73 if (bind(fd, (struct sockaddr *)&local_addr, len) == -1) {
74 close(fd);
78 return fd;
84 int i, j, fd[2]; local
90 fd[
104 int i, j, fd[2]; local
129 int i, j, ret, fd[2]; local
[all...]
/linux-master/tools/testing/selftests/fpu/
H A Dtest_fpu.c21 int fd = open(test_fpu_path, O_RDONLY); local
23 if (fd < 0) {
29 if (read(fd, dummy, 1) < 0) {
35 if (read(fd, dummy, 1) < 0) {
50 if (read(fd, dummy, 1) < 0) {
/linux-master/tools/testing/selftests/proc/
H A Dproc-uptime-001.c31 int fd; local
33 fd = open("/proc/uptime", O_RDONLY);
34 assert(fd >= 0);
36 u0 = proc_uptime(fd);
41 u1 = proc_uptime(fd);
H A Dproc-self-syscall.c25 static inline ssize_t sys_read(int fd, void *buf, size_t len) argument
27 return syscall(SYS_read, fd, buf, len);
34 int fd; local
37 fd = open("/proc/self/syscall", O_RDONLY);
38 if (fd == -1) {
46 (long)SYS_read, (long)fd, (long)buf2, (long)sizeof(buf2));
49 rv = sys_read(fd, buf2, sizeof(buf2));
/linux-master/tools/testing/selftests/cgroup/
H A Dwait_inotify.c32 int c, fd; local
49 fd = open(file, O_RDONLY);
50 if (fd < 0)
52 close(fd);
54 fd = inotify_init();
55 if (fd < 0)
57 if (inotify_add_watch(fd, file, IN_MODIFY) < 0)
59 fds.fd = fd;
81 len = read(fd, event
[all...]
/linux-master/tools/testing/selftests/tmpfs/
H A Dbug-link-o-tmpfile.c28 int fd; local
49 fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_TMPFILE, 0600);
50 if (fd == -1) {
54 if (linkat(fd, "", AT_FDCWD, "/tmp/1", AT_EMPTY_PATH) == -1) {
58 close(fd);
60 fd = openat(AT_FDCWD, "/tmp", O_WRONLY|O_TMPFILE, 0600);
61 if (fd == -1) {
/linux-master/tools/testing/selftests/user_events/
H A Ddyn_test.c26 int fd = open(abi_file, O_RDWR); local
29 if (fd < 0)
32 ret = ioctl(fd, DIAG_IOCSDEL, "__test_event");
34 close(fd);
44 int fd = open(enable_file, O_RDONLY); local
46 if (fd == -1)
49 close(fd);
56 static int reg_event(int fd, int *check, int bit, const char *value) argument
66 if (ioctl(fd, DIAG_IOCSREG, &reg) == -1)
72 static int unreg_event(int fd, in argument
85 int fd = open(dyn_file, O_RDWR | O_APPEND); local
109 int fd = open(abi_file, O_RDWR); local
147 int fd = open(abi_file, O_RDWR); local
[all...]
/linux-master/tools/testing/selftests/iommu/
H A Diommufd_fail_nth.c31 int fd; local
33 fd = openat(dfd, fn, O_WRONLY);
34 if (fd == -1)
36 res = write(fd, val, val_len);
38 close(fd);
207 int fd; local
213 self->fd = -1;
226 teardown_iommufd(self->fd, _metadata);
238 self->fd = open("/dev/iommu", O_RDWR);
239 if (self->fd
[all...]

Completed in 156 milliseconds

1234567891011>>