Lines Matching defs:uap
215 linux_sys_wait4(struct lwp *l, const struct linux_sys_wait4_args *uap, register_t *retval)
223 int error, status, options, linux_options, pid = SCARG(uap, pid);
228 linux_options = SCARG(uap, options);
242 SCARG(uap, rusage) != NULL ? &ru : NULL);
253 if (SCARG(uap, rusage) != NULL) {
255 error = copyout(&ru, SCARG(uap, rusage), sizeof(ru));
258 if (error == 0 && SCARG(uap, status) != NULL) {
260 error = copyout(&status, SCARG(uap, status), sizeof status);
271 linux_sys_waitid(struct lwp *l, const struct linux_sys_waitid_args *uap, register_t *retval)
289 linux_idtype = SCARG(uap, idtype);
306 linux_options = SCARG(uap, options);
311 id = SCARG(uap, id);
319 if (error == 0 && SCARG(uap, infop) != NULL) {
322 error = copyout(&linux_info, SCARG(uap, infop), sizeof(linux_info));
325 if (error == 0 && SCARG(uap, rusage) != NULL) {
327 error = copyout(&ru50, SCARG(uap, rusage), sizeof(ru50));
364 linux_sys_brk(struct lwp *l, const struct linux_sys_brk_args *uap, register_t *retval)
373 SCARG(&oba, nsize) = SCARG(uap, nsize);
384 linux_sys_statfs(struct lwp *l, const struct linux_sys_statfs_args *uap, register_t *retval)
395 error = do_sys_pstatvfs(l, SCARG(uap, path), ST_WAIT, sb);
398 error = copyout(<mp, SCARG(uap, sp), sizeof ltmp);
406 linux_sys_fstatfs(struct lwp *l, const struct linux_sys_fstatfs_args *uap, register_t *retval)
417 error = do_sys_fstatvfs(l, SCARG(uap, fd), ST_WAIT, sb);
420 error = copyout(<mp, SCARG(uap, sp), sizeof ltmp);
434 linux_sys_uname(struct lwp *l, const struct linux_sys_uname_args *uap, register_t *retval)
449 return copyout(&luts, SCARG(uap, up), sizeof(luts));
460 linux_sys_mmap(struct lwp *l, const struct linux_sys_mmap_args *uap, register_t *retval)
471 if (SCARG(uap, offset) & PAGE_MASK)
474 return linux_mmap(l, uap, retval, SCARG(uap, offset));
487 linux_sys_mmap2(struct lwp *l, const struct linux_sys_mmap2_args *uap, register_t *retval)
498 return linux_mmap(l, uap, retval,
499 ((off_t)SCARG(uap, offset)) << PAGE_SHIFT);
506 linux_mmap(struct lwp *l, const struct linux_sys_mmap_args *uap, register_t *retval, off_t offset)
512 linux_to_bsd_mmap_args(&cma, uap);
515 if (SCARG(uap, flags) & LINUX_MAP_GROWSDOWN) {
530 mmoff = round_page(ssl) - SCARG(uap, len);
550 linux_to_bsd_mmap_args(struct sys_mmap_args *cma, const struct linux_sys_mmap_args *uap)
552 int flags = MAP_TRYFIXED, fl = SCARG(uap, flags);
561 SCARG(cma, addr) = (void *)SCARG(uap, addr);
562 SCARG(cma, len) = SCARG(uap, len);
563 SCARG(cma, prot) = SCARG(uap, prot);
567 SCARG(cma, fd) = flags & MAP_ANON ? -1 : SCARG(uap, fd);
575 linux_sys_mremap(struct lwp *l, const struct linux_sys_mremap_args *uap, register_t *retval)
594 flags = SCARG(uap, flags);
595 oldva = (vaddr_t)SCARG(uap, old_address);
596 oldsize = round_page(SCARG(uap, old_size));
597 newsize = round_page(SCARG(uap, new_size));
608 newva = SCARG(uap, new_address);
632 linux_sys_mprotect(struct lwp *l, const struct linux_sys_mprotect_args *uap, register_t *retval)
645 start = (vaddr_t)SCARG(uap, start);
646 len = round_page(SCARG(uap, len));
647 prot = SCARG(uap, prot);
705 linux_sys_times(struct lwp *l, const struct linux_sys_times_args *uap, register_t *retval)
714 if (SCARG(uap, tms)) {
728 if ((error = copyout(<ms, SCARG(uap, tms), sizeof ltms)))
756 linux_sys_getdents(struct lwp *l, const struct linux_sys_getdents_args *uap, register_t *retval)
780 if ((error = fd_getvnode(SCARG(uap, fd), &fp)) != 0)
800 nbytes = SCARG(uap, count);
834 outp = (void *)SCARG(uap, dent);
902 if (outp == (void *)SCARG(uap, dent)) {
921 fd_putfile(SCARG(uap, fd));
933 linux_sys_select(struct lwp *l, const struct linux_sys_select_args *uap, register_t *retval)
943 return linux_select1(l, retval, SCARG(uap, nfds), SCARG(uap, readfds),
944 SCARG(uap, writefds), SCARG(uap, exceptfds),
945 (struct linux_timeval *)SCARG(uap, timeout));
1033 const struct linux_sys_pselect6_args *uap, register_t *retval)
1052 if (SCARG(uap, ss) != NULL) {
1053 if ((error = copyin(SCARG(uap, ss), &lsss, sizeof(lsss))) != 0)
1065 if (SCARG(uap, timeout) != NULL) {
1066 error = copyin(SCARG(uap, timeout), <s, sizeof(lts));
1080 error = selcommon(retval, SCARG(uap, nfds), SCARG(uap, readfds),
1081 SCARG(uap, writefds), SCARG(uap, exceptfds), tsp, ssp);
1101 error = copyout(<s, SCARG(uap, timeout), sizeof(lts));
1109 const struct linux_sys_ppoll_args *uap, register_t *retval)
1123 lts = SCARG(uap, timeout);
1131 lsigmask = SCARG(uap, sigset);
1139 return pollcommon(retval, SCARG(uap, fds), SCARG(uap, nfds),
1150 linux_sys_personality(struct lwp *l, const struct linux_sys_personality_args *uap, register_t *retval)
1158 per = SCARG(uap, per);
1184 linux_sys_setfsuid(struct lwp *l, const struct linux_sys_setfsuid_args *uap, register_t *retval)
1191 uid = SCARG(uap, uid);
1193 return sys_nosys(l, uap, retval);
1200 linux_sys_setfsgid(struct lwp *l, const struct linux_sys_setfsgid_args *uap, register_t *retval)
1207 gid = SCARG(uap, gid);
1209 return sys_nosys(l, uap, retval);
1216 linux_sys_setresuid(struct lwp *l, const struct linux_sys_setresuid_args *uap, register_t *retval)
1230 return do_setresuid(l, SCARG(uap, ruid), SCARG(uap, euid),
1231 SCARG(uap, suid),
1238 linux_sys_getresuid(struct lwp *l, const struct linux_sys_getresuid_args *uap, register_t *retval)
1257 if ((error = copyout(&uid, SCARG(uap, ruid), sizeof(uid_t))) != 0)
1261 if ((error = copyout(&uid, SCARG(uap, euid), sizeof(uid_t))) != 0)
1266 return (copyout(&uid, SCARG(uap, suid), sizeof(uid_t)));
1270 linux_sys_ptrace(struct lwp *l, const struct linux_sys_ptrace_args *uap, register_t *retval)
1285 request = SCARG(uap, request);
1291 SCARG(&pta, pid) = SCARG(uap, pid);
1292 SCARG(&pta, addr) = (void *)SCARG(uap, addr);
1293 SCARG(&pta, data) = SCARG(uap, data);
1301 if (request == LINUX_PTRACE_CONT && SCARG(uap, addr)==0)
1311 (void *)SCARG(uap, data),
1313 *retval = SCARG(uap, data);
1323 return LINUX_SYS_PTRACE_ARCH(l, uap, retval);
1327 linux_sys_reboot(struct lwp *l, const struct linux_sys_reboot_args *uap, register_t *retval)
1345 if (SCARG(uap, magic1) != LINUX_REBOOT_MAGIC1)
1347 if (SCARG(uap, magic2) != LINUX_REBOOT_MAGIC2 &&
1348 SCARG(uap, magic2) != LINUX_REBOOT_MAGIC2A &&
1349 SCARG(uap, magic2) != LINUX_REBOOT_MAGIC2B)
1352 switch ((unsigned long)SCARG(uap, cmd)) {
1365 SCARG(&sra, bootstr) = SCARG(uap, arg);
1382 linux_sys_swapon(struct lwp *l, const struct linux_sys_swapon_args *uap, register_t *retval)
1390 SCARG(&ua, arg) = (void *)__UNCONST(SCARG(uap, name));
1399 linux_sys_swapoff(struct lwp *l, const struct linux_sys_swapoff_args *uap, register_t *retval)
1407 SCARG(&ua, arg) = __UNCONST(SCARG(uap, path)); /*XXXUNCONST*/
1416 linux_sys_setdomainname(struct lwp *l, const struct linux_sys_setdomainname_args *uap, register_t *retval)
1426 return (old_sysctl(&name[0], 2, 0, 0, SCARG(uap, domainname),
1427 SCARG(uap, len), l));
1435 linux_sys_sysinfo(struct lwp *l, const struct linux_sys_sysinfo_args *uap, register_t *retval)
1469 return (copyout(&si, SCARG(uap, arg), sizeof si));
1473 linux_sys_getrlimit(struct lwp *l, const struct linux_sys_getrlimit_args *uap, register_t *retval)
1490 which = linux_to_bsd_limit(SCARG(uap, which));
1497 return copyout(&orl, SCARG(uap, rlp), sizeof(orl));
1501 linux_sys_setrlimit(struct lwp *l, const struct linux_sys_setrlimit_args *uap, register_t *retval)
1520 if ((error = copyin(SCARG(uap, rlp), &orl, sizeof(orl))) != 0)
1523 which = linux_to_bsd_limit(SCARG(uap, which));
1534 linux_sys_ugetrlimit(struct lwp *l, const struct linux_sys_ugetrlimit_args *uap, register_t *retval)
1536 return linux_sys_getrlimit(l, (const void *)uap, retval);
1541 linux_sys_prlimit64(struct lwp *l, const struct linux_sys_prlimit64_args *uap, register_t *retval)
1555 if (SCARG(uap, pid) != 0)
1558 which = linux_to_bsd_limit(SCARG(uap, which));
1562 p = SCARG(uap, old_rlp);
1570 p = SCARG(uap, new_rlp);
1594 linux_sys_getpriority(struct lwp *l, const struct linux_sys_getpriority_args *uap, register_t *retval)
1603 SCARG(&bsa, which) = SCARG(uap, which);
1604 SCARG(&bsa, who) = SCARG(uap, who);
1637 linux_sys_utimensat(struct lwp *l, const struct linux_sys_utimensat_args *uap,
1650 if (SCARG(uap, times)) {
1651 error = copyin(SCARG(uap, times), <s, sizeof(lts));
1659 return linux_do_sys_utimensat(l, SCARG(uap, fd), SCARG(uap, path),
1660 tsp, SCARG(uap, flag), retval);
1664 linux_sys_futex(struct lwp *l, const struct linux_sys_futex_args *uap,
1685 const int op = (SCARG(uap, op) & FUTEX_CMD_MASK);
1687 SCARG(uap, timeout) != NULL) {
1688 if ((error = copyin(SCARG(uap, timeout),
1695 val2 = (int)(uintptr_t)SCARG(uap, timeout);
1698 return linux_do_futex(SCARG(uap, uaddr), SCARG(uap, op),
1699 SCARG(uap, val), tsp, SCARG(uap, uaddr2), val2,
1700 SCARG(uap, val3), retval);
1747 linux_sys_eventfd(struct lwp *l, const struct linux_sys_eventfd_args *uap,
1754 return linux_do_eventfd2(l, SCARG(uap, initval), 0, retval);
1758 linux_sys_eventfd2(struct lwp *l, const struct linux_sys_eventfd2_args *uap,
1766 return linux_do_eventfd2(l, SCARG(uap, initval), SCARG(uap, flags),
1776 const struct linux_sys_epoll_create_args *uap, register_t *retval)
1784 * SCARG(uap, size) is unused. Linux just tests it and then
1787 if (SCARG(uap, size) <= 0)
1800 const struct linux_sys_epoll_create1_args *uap, register_t *retval)
1807 if ((SCARG(uap, flags) & ~(LINUX_O_CLOEXEC)) != 0)
1811 if ((SCARG(uap, flags) & LINUX_O_CLOEXEC) != 0)
1822 linux_sys_epoll_ctl(struct lwp *l, const struct linux_sys_epoll_ctl_args *uap,
1836 if (SCARG(uap, op) != EPOLL_CTL_DEL) {
1837 error = copyin(SCARG(uap, event), &lee, sizeof(lee));
1853 return epoll_ctl_common(l, retval, SCARG(uap, epfd), SCARG(uap, op),
1854 SCARG(uap, fd), eep);
1863 const struct linux_sys_epoll_wait_args *uap, register_t *retval)
1873 SCARG(&ea, epfd) = SCARG(uap, epfd);
1874 SCARG(&ea, events) = SCARG(uap, events);
1875 SCARG(&ea, maxevents) = SCARG(uap, maxevents);
1876 SCARG(&ea, timeout) = SCARG(uap, timeout);
1944 const struct linux_sys_epoll_pwait_args *uap, register_t *retval)
1954 const int timeout = SCARG(uap, timeout);
1965 return linux_epoll_pwait2_common(l, retval, SCARG(uap, epfd),
1966 SCARG(uap, events), SCARG(uap, maxevents), ltsp,
1967 SCARG(uap, sigmask));
1976 const struct linux_sys_epoll_pwait2_args *uap, register_t *retval)
1988 if (SCARG(uap, timeout) != NULL) {
1989 error = copyin(SCARG(uap, timeout), <s, sizeof(lts));
1997 return linux_epoll_pwait2_common(l, retval, SCARG(uap, epfd),
1998 SCARG(uap, events), SCARG(uap, maxevents), ltsp,
1999 SCARG(uap, sigmask));
2022 const struct linux_sys_memfd_create_args *uap, register_t *retval)
2031 const unsigned int lflags = SCARG(uap, flags);
2045 error = copyinstr(SCARG(uap, name), pbuf, LINUX_MFD_NAME_MAX+1, NULL);
2059 SCARG(&muap, name) = SCARG(uap, name);
2073 const struct linux_sys_close_range_args *uap, register_t *retval)
2083 const unsigned int flags = SCARG(uap, flags);
2087 if (SCARG(uap, first) > SCARG(uap, last))
2097 last = MIN(SCARG(uap, last), l->l_proc->p_fd->fd_lastfile);
2098 for (fd = SCARG(uap, first); fd <= last; fd++) {
2118 linux_sys_readahead(struct lwp *l, const struct linux_sys_readahead_args *uap,
2128 const int fd = SCARG(uap, fd);
2141 return do_posix_fadvise(fd, SCARG(uap, offset), SCARG(uap, count),
2146 linux_sys_getcpu(lwp_t *l, const struct linux_sys_getcpu_args *uap,
2156 if (SCARG(uap, cpu)) {
2158 error = copyout(&cpu_id, SCARG(uap, cpu), sizeof(cpu_id));
2165 if (SCARG(uap, node)) {
2167 error = copyout(&node_id, SCARG(uap, node), sizeof(node_id));