/arch/um/os-Linux/ |
D | file.c | 39 int os_stat_fd(const int fd, struct uml_stat *ubuf) in os_stat_fd() argument 44 CATCH_EINTR(err = fstat64(fd, &sbuf)); in os_stat_fd() 84 int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg) in os_ioctl_generic() argument 88 err = ioctl(fd, cmd, arg); in os_ioctl_generic() 96 int os_get_ifname(int fd, char* namebuf) in os_get_ifname() argument 98 if (ioctl(fd, SIOCGIFNAME, namebuf) < 0) in os_get_ifname() 104 int os_set_slip(int fd) in os_set_slip() argument 109 if (ioctl(fd, TIOCSETD, &disc) < 0) in os_set_slip() 113 if (ioctl(fd, SIOCSIFENCAP, &sencap) < 0) in os_set_slip() 119 int os_mode_fd(int fd, int mode) in os_mode_fd() argument [all …]
|
D | mem.c | 98 int fd; in make_tempfile() local 110 fd = open(tempdir, O_CLOEXEC | O_RDWR | O_EXCL | O_TMPFILE, 0700); in make_tempfile() 115 if (fd != -1 || (errno != EINVAL && errno != EISDIR && in make_tempfile() 117 return fd; in make_tempfile() 126 fd = mkstemp(tempname); in make_tempfile() 127 if (fd < 0) { in make_tempfile() 137 return fd; in make_tempfile() 139 close(fd); in make_tempfile() 149 int fd, err; in create_tmp_file() local 152 fd = make_tempfile(TEMPNAME_TEMPLATE); in create_tmp_file() [all …]
|
D | tty.c | 14 int fd; member 23 info->res = grantpt(info->fd); in grantpt_cb() 30 int fd, err; in get_pty() local 32 fd = open("/dev/ptmx", O_RDWR); in get_pty() 33 if (fd < 0) { in get_pty() 40 info.fd = fd; in get_pty() 50 if (unlockpt(fd) < 0) { in get_pty() 56 return fd; in get_pty() 58 close(fd); in get_pty()
|
D | process.c | 31 int fd, err; in os_process_pc() local 34 fd = open(proc_stat, O_RDONLY, 0); in os_process_pc() 35 if (fd < 0) { in os_process_pc() 40 CATCH_EINTR(err = read(fd, buf, sizeof(buf))); in os_process_pc() 46 os_close_file(fd); in os_process_pc() 54 close(fd); in os_process_pc() 63 int parent = FAILURE_PID, n, fd; in os_process_parent() local 69 fd = open(stat, O_RDONLY, 0); in os_process_parent() 70 if (fd < 0) { in os_process_parent() 76 CATCH_EINTR(n = read(fd, data, sizeof(data))); in os_process_parent() [all …]
|
/arch/um/drivers/ |
D | port_kern.c | 24 int fd; member 38 int fd; member 48 int fd; in pipe_interrupt() local 50 fd = os_rcv_fd(conn->socket[0], &conn->helper_pid); in pipe_interrupt() 51 if (fd < 0) { in pipe_interrupt() 52 if (fd == -EAGAIN) in pipe_interrupt() 56 -fd); in pipe_interrupt() 57 os_close_file(conn->fd); in pipe_interrupt() 62 conn->fd = fd; in pipe_interrupt() 79 int fd, socket[2], pid; in port_accept() local [all …]
|
D | chan_user.c | 17 void generic_close(int fd, void *unused) in generic_close() argument 19 close(fd); in generic_close() 22 int generic_read(int fd, char *c_out, void *unused) in generic_read() argument 26 n = read(fd, c_out, sizeof(*c_out)); in generic_read() 38 int generic_write(int fd, const char *buf, int n, void *unused) in generic_write() argument 42 err = write(fd, buf, n); in generic_write() 52 int generic_window_size(int fd, void *unused, unsigned short *rows_out, in generic_window_size() argument 58 if (ioctl(fd, TIOCGWINSZ, &size) < 0) in generic_window_size() 74 int generic_console_write(int fd, const char *buf, int n) in generic_console_write() argument 80 if (isatty(fd)) { in generic_console_write() [all …]
|
D | vector_user.c | 126 int fd = -1; in create_tap_fd() local 129 fd = open(PATH_NET_TUN, O_RDWR); in create_tap_fd() 130 if (fd < 0) { in create_tap_fd() 138 err = ioctl(fd, TUNSETIFF, (void *) &ifr); in create_tap_fd() 145 ioctl(fd, TUNSETOFFLOAD, offload); in create_tap_fd() 146 return fd; in create_tap_fd() 148 if (fd >= 0) in create_tap_fd() 149 os_close_file(fd); in create_tap_fd() 156 int fd = -1; in create_raw_fd() local 160 fd = socket(AF_PACKET, SOCK_RAW, flags); in create_raw_fd() [all …]
|
D | port_user.c | 74 int fd, err; in port_open() local 76 fd = port_wait(data->kernel_data); in port_open() 77 if ((fd >= 0) && data->raw) { in port_open() 78 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in port_open() 82 err = raw(fd); in port_open() 87 return fd; in port_open() 90 static void port_close(int fd, void *d) in port_close() argument 95 os_close_file(fd); in port_close() 114 int fd, err, arg; in port_listen_fd() local 116 fd = socket(PF_INET, SOCK_STREAM, 0); in port_listen_fd() [all …]
|
D | vector_user.h | 84 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, 98 extern void *uml_vector_default_bpf(int fd, void *mac); 99 extern int uml_vector_attach_bpf(int fd, void *bpf, int bpf_len); 100 extern bool uml_raw_enable_qdisc_bypass(int fd); 101 extern bool uml_raw_enable_vnet_headers(int fd); 102 extern bool uml_tap_enable_vnet_headers(int fd);
|
D | pty.c | 45 int fd, err; in pts_open() local 47 fd = get_pty(); in pts_open() 48 if (fd < 0) { in pts_open() 55 CATCH_EINTR(err = tcgetattr(fd, &data->tt)); in pts_open() 59 err = raw(fd); in pts_open() 64 dev = ptsname(fd); in pts_open() 71 return fd; in pts_open() 74 close(fd); in pts_open() 117 int fd, err; in pty_open() local 120 fd = getmaster(dev); in pty_open() [all …]
|
D | fd.c | 16 int fd; member 45 *data = ((struct fd_chan) { .fd = n, in fd_init() 55 if (data->raw && isatty(data->fd)) { in fd_open() 56 CATCH_EINTR(err = tcgetattr(data->fd, &data->tt)); in fd_open() 60 err = raw(data->fd); in fd_open() 64 sprintf(data->str, "%d", data->fd); in fd_open() 66 return data->fd; in fd_open() 69 static void fd_close(int fd, void *d) in fd_close() argument 74 if (!data->raw || !isatty(fd)) in fd_close() 77 CATCH_EINTR(err = tcsetattr(fd, TCSAFLUSH, &data->tt)); in fd_close()
|
D | umcast_user.c | 70 int fd, yes = 1, err = -EINVAL; in umcast_open() local 78 fd = socket(AF_INET, SOCK_DGRAM, 0); in umcast_open() 80 if (fd < 0) { in umcast_open() 87 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof(yes)) < 0) { in umcast_open() 96 if (setsockopt(fd, SOL_IP, IP_MULTICAST_TTL, &pri->ttl, in umcast_open() 105 if (setsockopt(fd, SOL_IP, IP_MULTICAST_LOOP, in umcast_open() 115 if (bind(fd, (struct sockaddr *) lsin, sizeof(*lsin)) < 0) { in umcast_open() 126 if (setsockopt(fd, SOL_IP, IP_ADD_MEMBERSHIP, in umcast_open() 140 return fd; in umcast_open() 143 close(fd); in umcast_open() [all …]
|
D | xterm.c | 88 int pid, fd, new, err; in xterm_open() local 112 fd = mkstemp(file); in xterm_open() 113 if (fd < 0) { in xterm_open() 124 close(fd); in xterm_open() 127 close(fd); in xterm_open() 129 fd = os_create_unix_socket(file, sizeof(file), 1); in xterm_open() 130 if (fd < 0) { in xterm_open() 132 "errno = %d\n", -fd); in xterm_open() 133 return fd; in xterm_open() 145 err = os_set_fd_block(fd, 0); in xterm_open() [all …]
|
/arch/powerpc/kernel/ |
D | sys_ppc32.c | 53 unsigned long fd, unsigned long pgoff) in compat_sys_mmap2() argument 56 return sys_mmap(addr, len, prot, flags, fd, pgoff << 12); in compat_sys_mmap2() 64 compat_ssize_t compat_sys_pread64(unsigned int fd, char __user *ubuf, compat_size_t count, in compat_sys_pread64() argument 67 return ksys_pread64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); in compat_sys_pread64() 70 compat_ssize_t compat_sys_pwrite64(unsigned int fd, const char __user *ubuf, compat_size_t count, in compat_sys_pwrite64() argument 73 return ksys_pwrite64(fd, ubuf, count, ((loff_t)poshi << 32) | poslo); in compat_sys_pwrite64() 76 compat_ssize_t compat_sys_readahead(int fd, u32 r4, u32 offhi, u32 offlo, u32 count) in compat_sys_readahead() argument 78 return ksys_readahead(fd, ((loff_t)offhi << 32) | offlo, count); in compat_sys_readahead() 87 asmlinkage long compat_sys_fallocate(int fd, int mode, u32 offhi, u32 offlo, in compat_sys_fallocate() argument 90 return ksys_fallocate(fd, mode, ((loff_t)offhi << 32) | offlo, in compat_sys_fallocate() [all …]
|
/arch/um/include/shared/ |
D | os.h | 136 extern int os_stat_fd(const int fd, struct uml_stat *buf); 138 extern int os_set_exec_close(int fd); 139 extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg); 140 extern int os_get_ifname(int fd, char *namebuf); 141 extern int os_set_slip(int fd); 142 extern int os_mode_fd(int fd, int mode); 143 extern int os_fsync_file(int fd); 145 extern int os_seek_file(int fd, unsigned long long offset); 147 extern int os_read_file(int fd, void *buf, int len); 148 extern int os_write_file(int fd, const void *buf, int count); [all …]
|
/arch/sh/kernel/ |
D | sys_sh32.c | 28 int fd[2]; in sys_sh_pipe() local 31 error = do_pipe_flags(fd, 0); in sys_sh_pipe() 33 current_pt_regs()->regs[1] = fd[1]; in sys_sh_pipe() 34 return fd[0]; in sys_sh_pipe() 39 asmlinkage ssize_t sys_pread_wrapper(unsigned int fd, char __user *buf, in sys_pread_wrapper() argument 42 return ksys_pread64(fd, buf, count, pos); in sys_pread_wrapper() 45 asmlinkage ssize_t sys_pwrite_wrapper(unsigned int fd, const char __user *buf, in sys_pwrite_wrapper() argument 48 return ksys_pwrite64(fd, buf, count, pos); in sys_pwrite_wrapper() 51 asmlinkage int sys_fadvise64_64_wrapper(int fd, u32 offset0, u32 offset1, in sys_fadvise64_64_wrapper() argument 55 return ksys_fadvise64_64(fd, (u64)offset1 << 32 | offset0, in sys_fadvise64_64_wrapper() [all …]
|
D | smp.c | 385 struct flush_tlb_data *fd = (struct flush_tlb_data *)info; in flush_tlb_range_ipi() local 387 local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2); in flush_tlb_range_ipi() 397 struct flush_tlb_data fd; in flush_tlb_range() local 399 fd.vma = vma; in flush_tlb_range() 400 fd.addr1 = start; in flush_tlb_range() 401 fd.addr2 = end; in flush_tlb_range() 402 smp_call_function(flush_tlb_range_ipi, (void *)&fd, 1); in flush_tlb_range() 415 struct flush_tlb_data *fd = (struct flush_tlb_data *)info; in flush_tlb_kernel_range_ipi() local 417 local_flush_tlb_kernel_range(fd->addr1, fd->addr2); in flush_tlb_kernel_range_ipi() 422 struct flush_tlb_data fd; in flush_tlb_kernel_range() local [all …]
|
/arch/xtensa/kernel/ |
D | smp.c | 493 struct flush_data *fd = arg; in ipi_flush_tlb_page() local 494 local_flush_tlb_page(fd->vma, fd->addr1); in ipi_flush_tlb_page() 499 struct flush_data fd = { in flush_tlb_page() local 503 on_each_cpu(ipi_flush_tlb_page, &fd, 1); in flush_tlb_page() 508 struct flush_data *fd = arg; in ipi_flush_tlb_range() local 509 local_flush_tlb_range(fd->vma, fd->addr1, fd->addr2); in ipi_flush_tlb_range() 515 struct flush_data fd = { in flush_tlb_range() local 520 on_each_cpu(ipi_flush_tlb_range, &fd, 1); in flush_tlb_range() 525 struct flush_data *fd = arg; in ipi_flush_tlb_kernel_range() local 526 local_flush_tlb_kernel_range(fd->addr1, fd->addr2); in ipi_flush_tlb_kernel_range() [all …]
|
/arch/arm64/kernel/ |
D | sys32.c | 41 COMPAT_SYSCALL_DEFINE3(aarch32_fstatfs64, unsigned int, fd, compat_size_t, sz, in COMPAT_SYSCALL_DEFINE3() argument 48 return kcompat_sys_fstatfs64(fd, sz, buf); in COMPAT_SYSCALL_DEFINE3() 57 unsigned long, fd, unsigned long, off_4k) in COMPAT_SYSCALL_DEFINE6() argument 64 return ksys_mmap_pgoff(addr, len, prot, flags, fd, off_4k); in COMPAT_SYSCALL_DEFINE6() 75 COMPAT_SYSCALL_DEFINE6(aarch32_pread64, unsigned int, fd, char __user *, buf, in COMPAT_SYSCALL_DEFINE6() argument 78 return ksys_pread64(fd, buf, count, arg_u64(pos)); in COMPAT_SYSCALL_DEFINE6() 81 COMPAT_SYSCALL_DEFINE6(aarch32_pwrite64, unsigned int, fd, in COMPAT_SYSCALL_DEFINE6() argument 85 return ksys_pwrite64(fd, buf, count, arg_u64(pos)); in COMPAT_SYSCALL_DEFINE6() 94 COMPAT_SYSCALL_DEFINE4(aarch32_ftruncate64, unsigned int, fd, u32, __pad, in COMPAT_SYSCALL_DEFINE4() argument 97 return ksys_ftruncate(fd, arg_u64(length)); in COMPAT_SYSCALL_DEFINE4() [all …]
|
/arch/mips/kernel/ |
D | linux32.c | 59 SYSCALL_DEFINE4(32_ftruncate64, unsigned long, fd, unsigned long, __dummy, 62 return ksys_ftruncate(fd, merge_64(a2, a3)); 65 SYSCALL_DEFINE5(32_llseek, unsigned int, fd, unsigned int, offset_high, 69 return sys_llseek(fd, offset_high, offset_low, result, origin); 76 SYSCALL_DEFINE6(32_pread, unsigned long, fd, char __user *, buf, size_t, count, 79 return ksys_pread64(fd, buf, count, merge_64(a4, a5)); 82 SYSCALL_DEFINE6(32_pwrite, unsigned int, fd, const char __user *, buf, 85 return ksys_pwrite64(fd, buf, count, merge_64(a4, a5)); 102 asmlinkage ssize_t sys32_readahead(int fd, u32 pad0, u64 a2, u64 a3, in sys32_readahead() argument 105 return ksys_readahead(fd, merge_64(a2, a3), count); in sys32_readahead() [all …]
|
/arch/xtensa/platforms/iss/include/platform/ |
D | simcall.h | 94 static inline int simc_close(int fd) in simc_close() argument 96 return __simc(SYS_close, fd, 0, 0); in simc_close() 99 static inline int simc_ioctl(int fd, int request, void *arg) in simc_ioctl() argument 101 return __simc(SYS_ioctl, fd, request, (int) arg); in simc_ioctl() 104 static inline int simc_read(int fd, void *buf, size_t count) in simc_read() argument 106 return __simc(SYS_read, fd, (int) buf, count); in simc_read() 109 static inline int simc_write(int fd, const void *buf, size_t count) in simc_write() argument 111 return __simc(SYS_write, fd, (int) buf, count); in simc_write() 114 static inline int simc_poll(int fd) in simc_poll() argument 118 return __simc(SYS_select_one, fd, XTISS_SELECT_ONE_READ, (int)&tv); in simc_poll() [all …]
|
/arch/s390/kernel/ |
D | compat_linux.c | 75 COMPAT_SYSCALL_DEFINE3(s390_ftruncate64, unsigned int, fd, u32, high, u32, low) in COMPAT_SYSCALL_DEFINE3() argument 77 return ksys_ftruncate(fd, (unsigned long)high << 32 | low); in COMPAT_SYSCALL_DEFINE3() 80 COMPAT_SYSCALL_DEFINE5(s390_pread64, unsigned int, fd, char __user *, ubuf, in COMPAT_SYSCALL_DEFINE5() argument 85 return ksys_pread64(fd, ubuf, count, (unsigned long)high << 32 | low); in COMPAT_SYSCALL_DEFINE5() 88 COMPAT_SYSCALL_DEFINE5(s390_pwrite64, unsigned int, fd, const char __user *, ubuf, in COMPAT_SYSCALL_DEFINE5() argument 93 return ksys_pwrite64(fd, ubuf, count, (unsigned long)high << 32 | low); in COMPAT_SYSCALL_DEFINE5() 96 COMPAT_SYSCALL_DEFINE4(s390_readahead, int, fd, u32, high, u32, low, s32, count) in COMPAT_SYSCALL_DEFINE4() argument 98 return ksys_readahead(fd, (unsigned long)high << 32 | low, count); in COMPAT_SYSCALL_DEFINE4() 168 COMPAT_SYSCALL_DEFINE2(s390_fstat64, unsigned int, fd, struct stat64_emu31 __user *, statbuf) in COMPAT_SYSCALL_DEFINE2() argument 171 int ret = vfs_fstat(fd, &stat); in COMPAT_SYSCALL_DEFINE2() [all …]
|
/arch/powerpc/platforms/cell/spufs/ |
D | coredump.c | 60 static int match_context(const void *v, struct file *file, unsigned fd) in match_context() argument 68 return fd + 1; in match_context() 83 static struct spu_context *coredump_next_context(int *fd) in coredump_next_context() argument 86 int n = iterate_fd(current->files, *fd, match_context, NULL); in coredump_next_context() 89 *fd = n - 1; in coredump_next_context() 90 file = fcheck(*fd); in coredump_next_context() 97 int size = 0, rc, fd; in spufs_coredump_extra_notes_size() local 99 fd = 0; in spufs_coredump_extra_notes_size() 100 while ((ctx = coredump_next_context(&fd)) != NULL) { in spufs_coredump_extra_notes_size() 104 rc = spufs_ctx_note_size(ctx, fd); in spufs_coredump_extra_notes_size() [all …]
|
/arch/x86/ia32/ |
D | sys_ia32.c | 62 COMPAT_SYSCALL_DEFINE3(x86_ftruncate64, unsigned int, fd, in COMPAT_SYSCALL_DEFINE3() argument 65 return ksys_ftruncate(fd, ((loff_t) offset_high << 32) | offset_low); in COMPAT_SYSCALL_DEFINE3() 121 COMPAT_SYSCALL_DEFINE2(x86_fstat64, unsigned int, fd, in COMPAT_SYSCALL_DEFINE2() argument 125 int ret = vfs_fstat(fd, &stat); in COMPAT_SYSCALL_DEFINE2() 155 unsigned int fd; member 169 return ksys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, in COMPAT_SYSCALL_DEFINE1() 174 COMPAT_SYSCALL_DEFINE5(x86_pread, unsigned int, fd, char __user *, ubuf, in COMPAT_SYSCALL_DEFINE5() argument 177 return ksys_pread64(fd, ubuf, count, in COMPAT_SYSCALL_DEFINE5() 181 COMPAT_SYSCALL_DEFINE5(x86_pwrite, unsigned int, fd, const char __user *, ubuf, in COMPAT_SYSCALL_DEFINE5() argument 184 return ksys_pwrite64(fd, ubuf, count, in COMPAT_SYSCALL_DEFINE5() [all …]
|
/arch/sparc/kernel/ |
D | systbls.h | 19 unsigned long fd, unsigned long off); 25 unsigned long fd, unsigned long pgoff); 55 asmlinkage long compat_sys_ftruncate64(unsigned int fd, 63 asmlinkage long compat_sys_fstat64(unsigned int fd, 68 asmlinkage long compat_sys_pread64(unsigned int fd, 73 asmlinkage long compat_sys_pwrite64(unsigned int fd, 78 asmlinkage long compat_sys_readahead(int fd, 82 long compat_sys_fadvise64(int fd, 86 long compat_sys_fadvise64_64(int fd, 90 long compat_sys_sync_file_range(unsigned int fd, [all …]
|