Lines Matching refs:args

150 linux_sysinfo(struct thread *td, struct linux_sysinfo_args *args)  in linux_sysinfo()  argument
192 return (copyout(&sysinfo, args->info, sizeof(sysinfo))); in linux_sysinfo()
197 linux_alarm(struct thread *td, struct linux_alarm_args *args) in linux_alarm() argument
205 printf(ARGS(alarm, "%u"), args->secs); in linux_alarm()
207 secs = args->secs; in linux_alarm()
233 linux_brk(struct thread *td, struct linux_brk_args *args) in linux_brk() argument
240 printf(ARGS(brk, "%p"), (void *)(uintptr_t)args->dsend); in linux_brk()
243 new = (uintptr_t)args->dsend; in linux_brk()
256 linux_uselib(struct thread *td, struct linux_uselib_args *args) in linux_uselib() argument
272 LCONVPATHEXIST(td, args->library, &library); in linux_uselib()
518 linux_select(struct thread *td, struct linux_select_args *args) in linux_select() argument
526 printf(ARGS(select, "%d, %p, %p, %p, %p"), args->nfds, in linux_select()
527 (void *)args->readfds, (void *)args->writefds, in linux_select()
528 (void *)args->exceptfds, (void *)args->timeout); in linux_select()
535 if (args->timeout) { in linux_select()
536 if ((error = copyin(args->timeout, &ltv, sizeof(ltv)))) in linux_select()
565 error = kern_select(td, args->nfds, args->readfds, args->writefds, in linux_select()
566 args->exceptfds, tvp, LINUX_NFDBITS); in linux_select()
575 if (args->timeout) { in linux_select()
597 if ((error = copyout(&ltv, args->timeout, sizeof(ltv)))) in linux_select()
611 linux_mremap(struct thread *td, struct linux_mremap_args *args) in linux_mremap() argument
620 (void *)(uintptr_t)args->addr, in linux_mremap()
621 (unsigned long)args->old_len, in linux_mremap()
622 (unsigned long)args->new_len, in linux_mremap()
623 (unsigned long)args->flags); in linux_mremap()
626 if (args->flags & ~(LINUX_MREMAP_FIXED | LINUX_MREMAP_MAYMOVE)) { in linux_mremap()
635 if (args->addr & PAGE_MASK) { in linux_mremap()
640 args->new_len = round_page(args->new_len); in linux_mremap()
641 args->old_len = round_page(args->old_len); in linux_mremap()
643 if (args->new_len > args->old_len) { in linux_mremap()
648 if (args->new_len < args->old_len) { in linux_mremap()
649 addr = args->addr + args->new_len; in linux_mremap()
650 len = args->old_len - args->new_len; in linux_mremap()
654 td->td_retval[0] = error ? 0 : (uintptr_t)args->addr; in linux_mremap()
663 linux_msync(struct thread *td, struct linux_msync_args *args) in linux_msync() argument
666 return (kern_msync(td, args->addr, args->len, in linux_msync()
667 args->fl & ~LINUX_MS_SYNC)); in linux_msync()
672 linux_time(struct thread *td, struct linux_time_args *args) in linux_time() argument
685 if (args->tm && (error = copyout(&tm, args->tm, sizeof(tm)))) in linux_time()
714 linux_times(struct thread *td, struct linux_times_args *args) in linux_times() argument
726 if (args->buf != NULL) { in linux_times()
741 if ((error = copyout(&tms, args->buf, sizeof(tms)))) in linux_times()
751 linux_newuname(struct thread *td, struct linux_newuname_args *args) in linux_newuname() argument
779 return (copyout(&utsname, args->buf, sizeof(utsname))); in linux_newuname()
789 linux_utime(struct thread *td, struct linux_utime_args *args) in linux_utime() argument
796 LCONVPATHEXIST(td, args->fname, &fname); in linux_utime()
803 if (args->times) { in linux_utime()
804 if ((error = copyin(args->times, &lut, sizeof lut))) { in linux_utime()
825 linux_utimes(struct thread *td, struct linux_utimes_args *args) in linux_utimes() argument
832 LCONVPATHEXIST(td, args->fname, &fname); in linux_utimes()
839 if (args->tptr != NULL) { in linux_utimes()
840 if ((error = copyin(args->tptr, ltv, sizeof ltv))) { in linux_utimes()
870 linux_utimensat(struct thread *td, struct linux_utimensat_args *args) in linux_utimensat() argument
877 dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; in linux_utimensat()
884 if (args->flags & ~LINUX_AT_SYMLINK_NOFOLLOW) in linux_utimensat()
887 if (args->times != NULL) { in linux_utimensat()
888 error = copyin(args->times, l_times, sizeof(l_times)); in linux_utimensat()
932 if (args->pathname != NULL) in linux_utimensat()
933 LCONVPATHEXIST_AT(td, args->pathname, &path, dfd); in linux_utimensat()
934 else if (args->flags != 0) in linux_utimensat()
937 if (args->flags & LINUX_AT_SYMLINK_NOFOLLOW) in linux_utimensat()
953 linux_futimesat(struct thread *td, struct linux_futimesat_args *args) in linux_futimesat() argument
960 dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; in linux_futimesat()
961 LCONVPATHEXIST_AT(td, args->filename, &fname, dfd); in linux_futimesat()
968 if (args->utimes != NULL) { in linux_futimesat()
969 if ((error = copyin(args->utimes, ltv, sizeof ltv))) { in linux_futimesat()
1014 linux_waitpid(struct thread *td, struct linux_waitpid_args *args) in linux_waitpid() argument
1021 args->pid, (void *)args->status, args->options); in linux_waitpid()
1024 wait4_args.pid = args->pid; in linux_waitpid()
1025 wait4_args.status = args->status; in linux_waitpid()
1026 wait4_args.options = args->options; in linux_waitpid()
1034 linux_wait4(struct thread *td, struct linux_wait4_args *args) in linux_wait4() argument
1042 args->pid, (void *)args->status, args->options, in linux_wait4()
1043 (void *)args->rusage); in linux_wait4()
1045 if (args->options & ~(LINUX_WUNTRACED | LINUX_WNOHANG | in linux_wait4()
1050 linux_to_bsd_waitopts(args->options, &options); in linux_wait4()
1052 if (args->rusage != NULL) in linux_wait4()
1056 error = linux_common_wait(td, args->pid, args->status, options, rup); in linux_wait4()
1059 if (args->rusage != NULL) in linux_wait4()
1060 error = linux_copyout_rusage(&ru, args->rusage); in linux_wait4()
1065 linux_waitid(struct thread *td, struct linux_waitid_args *args) in linux_waitid() argument
1076 linux_to_bsd_waitopts(args->options, &options); in linux_waitid()
1083 switch (args->idtype) { in linux_waitid()
1088 if (args->id <= 0) in linux_waitid()
1093 if (args->id <= 0) in linux_waitid()
1101 error = kern_wait6(td, idtype, args->id, &status, options, in linux_waitid()
1105 if (args->rusage != NULL) { in linux_waitid()
1107 args->rusage); in linux_waitid()
1111 if (args->info != NULL) { in linux_waitid()
1118 error = copyout(&lsi, args->info, sizeof(lsi)); in linux_waitid()
1127 linux_mknod(struct thread *td, struct linux_mknod_args *args) in linux_mknod() argument
1132 LCONVPATHCREAT(td, args->path, &path); in linux_mknod()
1136 printf(ARGS(mknod, "%s, %d, %ju"), path, args->mode, in linux_mknod()
1137 (uintmax_t)args->dev); in linux_mknod()
1140 switch (args->mode & S_IFMT) { in linux_mknod()
1144 args->mode); in linux_mknod()
1150 args->mode, args->dev); in linux_mknod()
1158 args->mode |= S_IFREG; in linux_mknod()
1162 O_WRONLY | O_CREAT | O_TRUNC, args->mode); in linux_mknod()
1177 linux_mknodat(struct thread *td, struct linux_mknodat_args *args) in linux_mknodat() argument
1182 dfd = (args->dfd == LINUX_AT_FDCWD) ? AT_FDCWD : args->dfd; in linux_mknodat()
1183 LCONVPATHCREAT_AT(td, args->filename, &path, dfd); in linux_mknodat()
1187 printf(ARGS(mknodat, "%s, %d, %d"), path, args->mode, args->dev); in linux_mknodat()
1190 switch (args->mode & S_IFMT) { in linux_mknodat()
1193 error = kern_mkfifoat(td, dfd, path, UIO_SYSSPACE, args->mode); in linux_mknodat()
1198 error = kern_mknodat(td, dfd, path, UIO_SYSSPACE, args->mode, in linux_mknodat()
1199 args->dev); in linux_mknodat()
1207 args->mode |= S_IFREG; in linux_mknodat()
1211 O_WRONLY | O_CREAT | O_TRUNC, args->mode); in linux_mknodat()
1228 linux_personality(struct thread *td, struct linux_personality_args *args) in linux_personality() argument
1236 printf(ARGS(personality, "%u"), args->per); in linux_personality()
1242 if (args->per != 0xffffffff) in linux_personality()
1243 pem->persona = args->per; in linux_personality()
1319 linux_nice(struct thread *td, struct linux_nice_args *args) in linux_nice() argument
1325 bsd_args.prio = args->inc; in linux_nice()
1331 linux_setgroups(struct thread *td, struct linux_setgroups_args *args) in linux_setgroups() argument
1339 ngrp = args->gidsetsize; in linux_setgroups()
1343 error = copyin(args->grouplist, linux_gidset, ngrp * sizeof(l_gid_t)); in linux_setgroups()
1388 linux_getgroups(struct thread *td, struct linux_getgroups_args *args) in linux_getgroups() argument
1405 if ((ngrp = args->gidsetsize) == 0) { in linux_getgroups()
1421 error = copyout(linux_gidset, args->grouplist, ngrp * sizeof(l_gid_t)); in linux_getgroups()
1431 linux_setrlimit(struct thread *td, struct linux_setrlimit_args *args) in linux_setrlimit() argument
1441 args->resource, (void *)args->rlim); in linux_setrlimit()
1444 if (args->resource >= LINUX_RLIM_NLIMITS) in linux_setrlimit()
1447 which = linux_to_bsd_resource[args->resource]; in linux_setrlimit()
1451 error = copyin(args->rlim, &rlim, sizeof(rlim)); in linux_setrlimit()
1462 linux_old_getrlimit(struct thread *td, struct linux_old_getrlimit_args *args) in linux_old_getrlimit() argument
1471 args->resource, (void *)args->rlim); in linux_old_getrlimit()
1474 if (args->resource >= LINUX_RLIM_NLIMITS) in linux_old_getrlimit()
1477 which = linux_to_bsd_resource[args->resource]; in linux_old_getrlimit()
1498 return (copyout(&rlim, args->rlim, sizeof(rlim))); in linux_old_getrlimit()
1503 linux_getrlimit(struct thread *td, struct linux_getrlimit_args *args) in linux_getrlimit() argument
1512 args->resource, (void *)args->rlim); in linux_getrlimit()
1515 if (args->resource >= LINUX_RLIM_NLIMITS) in linux_getrlimit()
1518 which = linux_to_bsd_resource[args->resource]; in linux_getrlimit()
1526 return (copyout(&rlim, args->rlim, sizeof(rlim))); in linux_getrlimit()
1531 struct linux_sched_setscheduler_args *args) in linux_sched_setscheduler() argument
1540 args->pid, args->policy, (const void *)args->param); in linux_sched_setscheduler()
1543 switch (args->policy) { in linux_sched_setscheduler()
1557 error = copyin(args->param, &sched_param, sizeof(sched_param)); in linux_sched_setscheduler()
1561 tdt = linux_tdfind(td, args->pid, -1); in linux_sched_setscheduler()
1572 struct linux_sched_getscheduler_args *args) in linux_sched_getscheduler() argument
1579 printf(ARGS(sched_getscheduler, "%d"), args->pid); in linux_sched_getscheduler()
1582 tdt = linux_tdfind(td, args->pid, -1); in linux_sched_getscheduler()
1605 struct linux_sched_get_priority_max_args *args) in linux_sched_get_priority_max() argument
1611 printf(ARGS(sched_get_priority_max, "%d"), args->policy); in linux_sched_get_priority_max()
1614 switch (args->policy) { in linux_sched_get_priority_max()
1632 struct linux_sched_get_priority_min_args *args) in linux_sched_get_priority_min() argument
1638 printf(ARGS(sched_get_priority_min, "%d"), args->policy); in linux_sched_get_priority_min()
1641 switch (args->policy) { in linux_sched_get_priority_min()
1669 linux_reboot(struct thread *td, struct linux_reboot_args *args) in linux_reboot() argument
1675 printf(ARGS(reboot, "0x%x"), args->cmd); in linux_reboot()
1678 if (args->magic1 != REBOOT_MAGIC1) in linux_reboot()
1681 switch (args->magic2) { in linux_reboot()
1690 switch (args->cmd) { in linux_reboot()
1712 linux_getpid(struct thread *td, struct linux_getpid_args *args) in linux_getpid() argument
1725 linux_gettid(struct thread *td, struct linux_gettid_args *args) in linux_gettid() argument
1744 linux_getppid(struct thread *td, struct linux_getppid_args *args) in linux_getppid() argument
1757 linux_getgid(struct thread *td, struct linux_getgid_args *args) in linux_getgid() argument
1770 linux_getuid(struct thread *td, struct linux_getuid_args *args) in linux_getuid() argument
1784 linux_getsid(struct thread *td, struct linux_getsid_args *args) in linux_getsid() argument
1790 printf(ARGS(getsid, "%i"), args->pid); in linux_getsid()
1793 bsd.pid = args->pid; in linux_getsid()
1805 linux_getpriority(struct thread *td, struct linux_getpriority_args *args) in linux_getpriority() argument
1812 printf(ARGS(getpriority, "%i, %i"), args->which, args->who); in linux_getpriority()
1815 bsd_args.which = args->which; in linux_getpriority()
1816 bsd_args.who = args->who; in linux_getpriority()
1823 linux_sethostname(struct thread *td, struct linux_sethostname_args *args) in linux_sethostname() argument
1829 printf(ARGS(sethostname, "*, %i"), args->len); in linux_sethostname()
1834 return (userland_sysctl(td, name, 2, 0, 0, 0, args->hostname, in linux_sethostname()
1835 args->len, 0, 0)); in linux_sethostname()
1839 linux_setdomainname(struct thread *td, struct linux_setdomainname_args *args) in linux_setdomainname() argument
1845 printf(ARGS(setdomainname, "*, %i"), args->len); in linux_setdomainname()
1850 return (userland_sysctl(td, name, 2, 0, 0, 0, args->name, in linux_setdomainname()
1851 args->len, 0, 0)); in linux_setdomainname()
1855 linux_exit_group(struct thread *td, struct linux_exit_group_args *args) in linux_exit_group() argument
1860 printf(ARGS(exit_group, "%i"), args->error_code); in linux_exit_group()
1864 args->error_code); in linux_exit_group()
1871 exit1(td, args->error_code, 0); in linux_exit_group()
2001 linux_prctl(struct thread *td, struct linux_prctl_args *args) in linux_prctl() argument
2010 printf(ARGS(prctl, "%d, %ju, %ju, %ju, %ju"), args->option, in linux_prctl()
2011 (uintmax_t)args->arg2, (uintmax_t)args->arg3, in linux_prctl()
2012 (uintmax_t)args->arg4, (uintmax_t)args->arg5); in linux_prctl()
2015 switch (args->option) { in linux_prctl()
2017 if (!LINUX_SIG_VALID(args->arg2)) in linux_prctl()
2019 pdeath_signal = linux_to_bsd_signal(args->arg2); in linux_prctl()
2029 (void *)(register_t)args->arg2, in linux_prctl()
2055 error = copyinstr((void *)(register_t)args->arg2, comm, in linux_prctl()
2066 error = copyin((void *)(register_t)args->arg2, comm, in linux_prctl()
2081 error = copyout(comm, (void *)(register_t)args->arg2, in linux_prctl()
2148 struct linux_sched_getaffinity_args *args) in linux_sched_getaffinity() argument
2155 printf(ARGS(sched_getaffinity, "%d, %d, *"), args->pid, in linux_sched_getaffinity()
2156 args->len); in linux_sched_getaffinity()
2158 if (args->len < sizeof(cpuset_t)) in linux_sched_getaffinity()
2161 tdt = linux_tdfind(td, args->pid, -1); in linux_sched_getaffinity()
2168 tdt->td_tid, sizeof(cpuset_t), (cpuset_t *)args->user_mask_ptr); in linux_sched_getaffinity()
2180 struct linux_sched_setaffinity_args *args) in linux_sched_setaffinity() argument
2186 printf(ARGS(sched_setaffinity, "%d, %d, *"), args->pid, in linux_sched_setaffinity()
2187 args->len); in linux_sched_setaffinity()
2189 if (args->len < sizeof(cpuset_t)) in linux_sched_setaffinity()
2192 tdt = linux_tdfind(td, args->pid, -1); in linux_sched_setaffinity()
2199 tdt->td_tid, sizeof(cpuset_t), (cpuset_t *) args->user_mask_ptr)); in linux_sched_setaffinity()
2208 linux_prlimit64(struct thread *td, struct linux_prlimit64_args *args) in linux_prlimit64() argument
2219 printf(ARGS(prlimit64, "%d, %d, %p, %p"), args->pid, in linux_prlimit64()
2220 args->resource, (void *)args->new, (void *)args->old); in linux_prlimit64()
2223 if (args->resource >= LINUX_RLIM_NLIMITS) in linux_prlimit64()
2226 which = linux_to_bsd_resource[args->resource]; in linux_prlimit64()
2230 if (args->new != NULL) { in linux_prlimit64()
2236 error = copyin(args->new, &nrlim, sizeof(nrlim)); in linux_prlimit64()
2242 if (args->new != NULL) in linux_prlimit64()
2246 error = pget(args->pid, flags, &p); in linux_prlimit64()
2250 if (args->old != NULL) { in linux_prlimit64()
2262 error = copyout(&lrlim, args->old, sizeof(lrlim)); in linux_prlimit64()
2267 if (args->new != NULL) in linux_prlimit64()
2276 linux_pselect6(struct thread *td, struct linux_pselect6_args *args) in linux_pselect6() argument
2288 if (args->sig != NULL) { in linux_pselect6()
2289 error = copyin(args->sig, &lpse6, sizeof(lpse6)); in linux_pselect6()
2308 if (args->tsp != NULL) { in linux_pselect6()
2309 error = copyin(args->tsp, &lts, sizeof(lts)); in linux_pselect6()
2325 error = kern_pselect(td, args->nfds, args->readfds, args->writefds, in linux_pselect6()
2326 args->exceptfds, tvp, ssp, LINUX_NFDBITS); in linux_pselect6()
2328 if (error == 0 && args->tsp != NULL) { in linux_pselect6()
2349 error = copyout(&lts, args->tsp, sizeof(lts)); in linux_pselect6()
2356 linux_ppoll(struct thread *td, struct linux_ppoll_args *args) in linux_ppoll() argument
2366 if (args->sset != NULL) { in linux_ppoll()
2367 if (args->ssize != sizeof(l_ss)) in linux_ppoll()
2369 error = copyin(args->sset, &l_ss, sizeof(l_ss)); in linux_ppoll()
2376 if (args->tsp != NULL) { in linux_ppoll()
2377 error = copyin(args->tsp, &lts, sizeof(lts)); in linux_ppoll()
2389 error = kern_poll(td, args->fds, args->nfds, tsp, ssp); in linux_ppoll()
2391 if (error == 0 && args->tsp != NULL) { in linux_ppoll()
2403 error = copyout(&lts, args->tsp, sizeof(lts)); in linux_ppoll()
2567 linux_getrandom(struct thread *td, struct linux_getrandom_args *args) in linux_getrandom() argument
2573 if (args->flags & ~(LINUX_GRND_NONBLOCK|LINUX_GRND_RANDOM)) in linux_getrandom()
2575 if (args->count > INT_MAX) in linux_getrandom()
2576 args->count = INT_MAX; in linux_getrandom()
2578 iov.iov_base = args->buf; in linux_getrandom()
2579 iov.iov_len = args->count; in linux_getrandom()
2588 error = read_random_uio(&uio, args->flags & LINUX_GRND_NONBLOCK); in linux_getrandom()
2590 td->td_retval[0] = args->count - uio.uio_resid; in linux_getrandom()
2595 linux_mincore(struct thread *td, struct linux_mincore_args *args) in linux_mincore() argument
2599 if (args->start & PAGE_MASK) in linux_mincore()
2601 return (kern_mincore(td, args->start, args->len, args->vec)); in linux_mincore()