Lines Matching defs:uap

172 sys_sync(struct thread *td, struct sync_args *uap)
190 sys_quotactl(struct thread *td, struct quotactl_args *uap)
197 AUDIT_ARG_CMD(uap->cmd);
198 AUDIT_ARG_UID(uap->uid);
202 uap->path);
215 error = VFS_QUOTACTL(mp, uap->cmd, uap->uid, uap->arg, &mp_busy);
313 sys_statfs(struct thread *td, struct statfs_args *uap)
319 error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp);
321 error = copyout(sfp, uap->buf, sizeof(struct statfs));
354 sys_fstatfs(struct thread *td, struct fstatfs_args *uap)
360 error = kern_fstatfs(td, uap->fd, sfp);
362 error = copyout(sfp, uap->buf, sizeof(struct statfs));
403 sys_getfsstat(struct thread *td, struct getfsstat_args *uap)
408 if (uap->bufsize < 0 || uap->bufsize > SIZE_MAX)
410 error = kern_getfsstat(td, &uap->buf, uap->bufsize, &count,
411 UIO_USERSPACE, uap->mode);
596 freebsd4_statfs(struct thread *td, struct freebsd4_statfs_args *uap)
603 error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp);
606 error = copyout(&osb, uap->buf, sizeof(osb));
622 freebsd4_fstatfs(struct thread *td, struct freebsd4_fstatfs_args *uap)
629 error = kern_fstatfs(td, uap->fd, sfp);
632 error = copyout(&osb, uap->buf, sizeof(osb));
649 freebsd4_getfsstat(struct thread *td, struct freebsd4_getfsstat_args *uap)
656 if (uap->bufsize < 0)
658 count = uap->bufsize / sizeof(struct ostatfs);
663 uap->mode);
670 error = copyout(&osb, uap->buf, sizeof(osb));
672 uap->buf++;
690 freebsd4_fhstatfs(struct thread *td, struct freebsd4_fhstatfs_args *uap)
697 error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t));
704 error = copyout(&osb, uap->buf, sizeof(osb));
750 freebsd11_statfs(struct thread *td, struct freebsd11_statfs_args *uap)
757 error = kern_statfs(td, uap->path, UIO_USERSPACE, sfp);
760 error = copyout(&osb, uap->buf, sizeof(osb));
770 freebsd11_fstatfs(struct thread *td, struct freebsd11_fstatfs_args *uap)
777 error = kern_fstatfs(td, uap->fd, sfp);
780 error = copyout(&osb, uap->buf, sizeof(osb));
790 freebsd11_getfsstat(struct thread *td, struct freebsd11_getfsstat_args *uap)
792 return (kern_freebsd11_getfsstat(td, uap->buf, uap->bufsize, uap->mode));
830 freebsd11_fhstatfs(struct thread *td, struct freebsd11_fhstatfs_args *uap)
837 error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t));
844 error = copyout(&osb, uap->buf, sizeof(osb));
893 sys_fchdir(struct thread *td, struct fchdir_args *uap)
900 AUDIT_ARG_FD(uap->fd);
901 error = getvnode_path(td, uap->fd, &cap_fchdir_rights,
939 sys_chdir(struct thread *td, struct chdir_args *uap)
942 return (kern_chdir(td, uap->path, UIO_USERSPACE));
1018 sys_chroot(struct thread *td, struct chroot_args *uap)
1024 UIO_USERSPACE, uap->path);
1042 sys_fchroot(struct thread *td, struct fchroot_args *uap)
1048 error = getvnode_path(td, uap->fd, &cap_fchroot_rights, &fp);
1129 sys_open(struct thread *td, struct open_args *uap)
1132 return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
1133 uap->flags, uap->mode));
1145 sys_openat(struct thread *td, struct openat_args *uap)
1148 AUDIT_ARG_FD(uap->fd);
1149 return (kern_openat(td, uap->fd, uap->path, UIO_USERSPACE, uap->flag,
1150 uap->mode));
1343 ocreat(struct thread *td, struct ocreat_args *uap)
1346 return (kern_openat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
1347 O_WRONLY | O_CREAT | O_TRUNC, uap->mode));
1363 sys_mknodat(struct thread *td, struct mknodat_args *uap)
1366 return (kern_mknodat(td, uap->fd, uap->path, UIO_USERSPACE, uap->mode,
1367 uap->dev));
1373 struct freebsd11_mknod_args *uap)
1376 return (kern_mknodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
1377 uap->mode, uap->dev));
1382 struct freebsd11_mknodat_args *uap)
1385 return (kern_mknodat(td, uap->fd, uap->path, UIO_USERSPACE, uap->mode,
1386 uap->dev));
1498 sys_mkfifo(struct thread *td, struct mkfifo_args *uap)
1501 return (kern_mkfifoat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
1502 uap->mode));
1513 sys_mkfifoat(struct thread *td, struct mkfifoat_args *uap)
1516 return (kern_mkfifoat(td, uap->fd, uap->path, UIO_USERSPACE,
1517 uap->mode));
1584 sys_link(struct thread *td, struct link_args *uap)
1587 return (kern_linkat(td, AT_FDCWD, AT_FDCWD, uap->path, uap->link,
1601 sys_linkat(struct thread *td, struct linkat_args *uap)
1604 return (kern_linkat(td, uap->fd1, uap->fd2, uap->path1, uap->path2,
1605 UIO_USERSPACE, uap->flag));
1765 sys_symlink(struct thread *td, struct symlink_args *uap)
1768 return (kern_symlinkat(td, uap->path, AT_FDCWD, uap->link,
1780 sys_symlinkat(struct thread *td, struct symlinkat_args *uap)
1783 return (kern_symlinkat(td, uap->path1, uap->fd, uap->path2,
1865 sys_undelete(struct thread *td, struct undelete_args *uap)
1875 UIO_USERSPACE, uap->path);
1915 sys_unlink(struct thread *td, struct unlink_args *uap)
1918 return (kern_funlinkat(td, AT_FDCWD, uap->path, FD_NONE, UIO_USERSPACE,
1944 sys_unlinkat(struct thread *td, struct unlinkat_args *uap)
1947 return (kern_funlinkat_ex(td, uap->fd, uap->path, FD_NONE, uap->flag,
1960 sys_funlinkat(struct thread *td, struct funlinkat_args *uap)
1963 return (kern_funlinkat_ex(td, uap->dfd, uap->path, uap->fd, uap->flag,
2070 sys_lseek(struct thread *td, struct lseek_args *uap)
2073 return (kern_lseek(td, uap->fd, uap->offset, uap->whence));
2104 olseek(struct thread *td, struct olseek_args *uap)
2107 return (kern_lseek(td, uap->fd, uap->offset, uap->whence));
2114 freebsd6_lseek(struct thread *td, struct freebsd6_lseek_args *uap)
2117 return (kern_lseek(td, uap->fd, uap->offset, uap->whence));
2162 sys_access(struct thread *td, struct access_args *uap)
2165 return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2166 0, uap->amode));
2178 sys_faccessat(struct thread *td, struct faccessat_args *uap)
2181 return (kern_accessat(td, uap->fd, uap->path, UIO_USERSPACE, uap->flag,
2182 uap->amode));
2243 sys_eaccess(struct thread *td, struct eaccess_args *uap)
2246 return (kern_accessat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2247 AT_EACCESS, uap->amode));
2261 ostat(struct thread *td, struct ostat_args *uap)
2267 error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb);
2271 return (copyout(&osb, uap->ub, sizeof (osb)));
2284 olstat(struct thread *td, struct olstat_args *uap)
2290 error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path,
2295 return (copyout(&osb, uap->ub, sizeof (osb)));
2403 freebsd11_stat(struct thread *td, struct freebsd11_stat_args* uap)
2409 error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb);
2414 error = copyout(&osb, uap->ub, sizeof(osb));
2419 freebsd11_lstat(struct thread *td, struct freebsd11_lstat_args* uap)
2425 error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path,
2431 error = copyout(&osb, uap->ub, sizeof(osb));
2436 freebsd11_fhstat(struct thread *td, struct freebsd11_fhstat_args* uap)
2443 error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t));
2451 error = copyout(&osb, uap->sb, sizeof(osb));
2456 freebsd11_fstatat(struct thread *td, struct freebsd11_fstatat_args* uap)
2462 error = kern_statat(td, uap->flag, uap->fd, uap->path,
2468 error = copyout(&osb, uap->buf, sizeof(osb));
2485 sys_fstatat(struct thread *td, struct fstatat_args *uap)
2490 error = kern_statat(td, uap->flag, uap->fd, uap->path,
2493 error = copyout(&sb, uap->buf, sizeof (sb));
2575 freebsd11_nstat(struct thread *td, struct freebsd11_nstat_args *uap)
2581 error = kern_statat(td, 0, AT_FDCWD, uap->path, UIO_USERSPACE, &sb);
2586 error = copyout(&nsb, uap->ub, sizeof (nsb));
2600 freebsd11_nlstat(struct thread *td, struct freebsd11_nlstat_args *uap)
2606 error = kern_statat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->path,
2612 error = copyout(&nsb, uap->ub, sizeof (nsb));
2627 sys_pathconf(struct thread *td, struct pathconf_args *uap)
2632 error = kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name, FOLLOW,
2646 sys_lpathconf(struct thread *td, struct lpathconf_args *uap)
2651 error = kern_pathconf(td, uap->path, UIO_USERSPACE, uap->name,
2687 sys_readlink(struct thread *td, struct readlink_args *uap)
2690 return (kern_readlinkat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2691 uap->buf, UIO_USERSPACE, uap->count));
2702 sys_readlinkat(struct thread *td, struct readlinkat_args *uap)
2705 return (kern_readlinkat(td, uap->fd, uap->path, UIO_USERSPACE,
2706 uap->buf, UIO_USERSPACE, uap->bufsize));
2819 sys_chflags(struct thread *td, struct chflags_args *uap)
2822 return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2823 uap->flags, 0));
2835 sys_chflagsat(struct thread *td, struct chflagsat_args *uap)
2838 return (kern_chflagsat(td, uap->fd, uap->path, UIO_USERSPACE,
2839 uap->flags, uap->atflag));
2852 sys_lchflags(struct thread *td, struct lchflags_args *uap)
2855 return (kern_chflagsat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2856 uap->flags, AT_SYMLINK_NOFOLLOW));
2892 sys_fchflags(struct thread *td, struct fchflags_args *uap)
2897 AUDIT_ARG_FD(uap->fd);
2898 AUDIT_ARG_FFLAGS(uap->flags);
2899 error = getvnode(td, uap->fd, &cap_fchflags_rights,
2910 error = setfflags(td, fp->f_vnode, uap->flags);
2950 sys_chmod(struct thread *td, struct chmod_args *uap)
2953 return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2954 uap->mode, 0));
2966 sys_fchmodat(struct thread *td, struct fchmodat_args *uap)
2969 return (kern_fchmodat(td, uap->fd, uap->path, UIO_USERSPACE,
2970 uap->mode, uap->flag));
2983 sys_lchmod(struct thread *td, struct lchmod_args *uap)
2986 return (kern_fchmodat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
2987 uap->mode, AT_SYMLINK_NOFOLLOW));
3023 sys_fchmod(struct thread *td, struct fchmod_args *uap)
3028 AUDIT_ARG_FD(uap->fd);
3029 AUDIT_ARG_MODE(uap->mode);
3031 error = fget(td, uap->fd, &cap_fchmod_rights, &fp);
3034 error = fo_chmod(fp, uap->mode, td->td_ucred, td);
3078 sys_chown(struct thread *td, struct chown_args *uap)
3081 return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE, uap->uid,
3082 uap->gid, 0));
3095 sys_fchownat(struct thread *td, struct fchownat_args *uap)
3098 return (kern_fchownat(td, uap->fd, uap->path, UIO_USERSPACE, uap->uid,
3099 uap->gid, uap->flag));
3137 sys_lchown(struct thread *td, struct lchown_args *uap)
3140 return (kern_fchownat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
3141 uap->uid, uap->gid, AT_SYMLINK_NOFOLLOW));
3155 sys_fchown(struct thread *td, struct fchown_args *uap)
3160 AUDIT_ARG_FD(uap->fd);
3161 AUDIT_ARG_OWNER(uap->uid, uap->gid);
3162 error = fget(td, uap->fd, &cap_fchown_rights, &fp);
3165 error = fo_chown(fp, uap->uid, uap->gid, td->td_ucred, td);
3300 sys_utimes(struct thread *td, struct utimes_args *uap)
3303 return (kern_utimesat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
3304 uap->tptr, UIO_USERSPACE));
3315 sys_futimesat(struct thread *td, struct futimesat_args *uap)
3318 return (kern_utimesat(td, uap->fd, uap->path, UIO_USERSPACE,
3319 uap->times, UIO_USERSPACE));
3353 sys_lutimes(struct thread *td, struct lutimes_args *uap)
3356 return (kern_lutimes(td, uap->path, UIO_USERSPACE, uap->tptr,
3389 sys_futimes(struct thread *td, struct futimes_args *uap)
3392 return (kern_futimes(td, uap->fd, uap->tptr, UIO_USERSPACE));
3423 sys_futimens(struct thread *td, struct futimens_args *uap)
3426 return (kern_futimens(td, uap->fd, uap->times, UIO_USERSPACE));
3459 sys_utimensat(struct thread *td, struct utimensat_args *uap)
3462 return (kern_utimensat(td, uap->fd, uap->path, UIO_USERSPACE,
3463 uap->times, UIO_USERSPACE, uap->flag));
3510 sys_truncate(struct thread *td, struct truncate_args *uap)
3513 return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
3577 otruncate(struct thread *td, struct otruncate_args *uap)
3580 return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
3587 freebsd6_truncate(struct thread *td, struct freebsd6_truncate_args *uap)
3590 return (kern_truncate(td, uap->path, UIO_USERSPACE, uap->length));
3594 freebsd6_ftruncate(struct thread *td, struct freebsd6_ftruncate_args *uap)
3597 return (kern_ftruncate(td, uap->fd, uap->length));
3644 sys_fsync(struct thread *td, struct fsync_args *uap)
3647 return (kern_fsync(td, uap->fd, true));
3651 sys_fdatasync(struct thread *td, struct fdatasync_args *uap)
3654 return (kern_fsync(td, uap->fd, false));
3668 sys_rename(struct thread *td, struct rename_args *uap)
3671 return (kern_renameat(td, AT_FDCWD, uap->from, AT_FDCWD,
3672 uap->to, UIO_USERSPACE));
3684 sys_renameat(struct thread *td, struct renameat_args *uap)
3687 return (kern_renameat(td, uap->oldfd, uap->old, uap->newfd, uap->new,
3850 sys_mkdir(struct thread *td, struct mkdir_args *uap)
3853 return (kern_mkdirat(td, AT_FDCWD, uap->path, UIO_USERSPACE,
3854 uap->mode));
3865 sys_mkdirat(struct thread *td, struct mkdirat_args *uap)
3868 return (kern_mkdirat(td, uap->fd, uap->path, UIO_USERSPACE, uap->mode));
3926 sys_rmdir(struct thread *td, struct rmdir_args *uap)
3929 return (kern_frmdirat(td, AT_FDCWD, uap->path, FD_NONE, UIO_USERSPACE,
4129 ogetdirentries(struct thread *td, struct ogetdirentries_args *uap)
4134 error = kern_ogetdirentries(td, uap, &loff);
4136 error = copyout(&loff, uap->basep, sizeof(long));
4141 kern_ogetdirentries(struct thread *td, struct ogetdirentries_args *uap,
4148 if (uap->count > 64 * 1024)
4151 error = freebsd11_kern_getdirentries(td, uap->fd, uap->buf, uap->count,
4154 if (error == 0 && uap->basep != NULL)
4155 error = copyout(&base, uap->basep, sizeof(long));
4172 struct freebsd11_getdirentries_args *uap)
4177 error = freebsd11_kern_getdirentries(td, uap->fd, uap->buf, uap->count,
4180 if (error == 0 && uap->basep != NULL)
4181 error = copyout(&base, uap->basep, sizeof(long));
4186 freebsd11_getdents(struct thread *td, struct freebsd11_getdents_args *uap)
4190 ap.fd = uap->fd;
4191 ap.buf = uap->buf;
4192 ap.count = uap->count;
4202 sys_getdirentries(struct thread *td, struct getdirentries_args *uap)
4207 error = kern_getdirentries(td, uap->fd, uap->buf, uap->count, &base,
4211 if (uap->basep != NULL)
4212 error = copyout(&base, uap->basep, sizeof(off_t));
4303 sys_umask(struct thread *td, struct umask_args *uap)
4310 pdp->pd_cmask = uap->newmask & ALLPERMS;
4325 sys_revoke(struct thread *td, struct revoke_args *uap)
4333 uap->path);
4437 sys_lgetfh(struct thread *td, struct lgetfh_args *uap)
4440 return (kern_getfhat(td, AT_SYMLINK_NOFOLLOW, AT_FDCWD, uap->fname,
4441 UIO_USERSPACE, uap->fhp, UIO_USERSPACE));
4451 sys_getfh(struct thread *td, struct getfh_args *uap)
4454 return (kern_getfhat(td, 0, AT_FDCWD, uap->fname, UIO_USERSPACE,
4455 uap->fhp, UIO_USERSPACE));
4474 sys_getfhat(struct thread *td, struct getfhat_args *uap)
4477 return (kern_getfhat(td, uap->flags, uap->fd, uap->path, UIO_USERSPACE,
4478 uap->fhp, UIO_USERSPACE));
4523 sys_fhlink(struct thread *td, struct fhlink_args *uap)
4526 return (kern_fhlinkat(td, AT_FDCWD, uap->to, UIO_USERSPACE, uap->fhp));
4537 sys_fhlinkat(struct thread *td, struct fhlinkat_args *uap)
4540 return (kern_fhlinkat(td, uap->tofd, uap->to, UIO_USERSPACE, uap->fhp));
4580 sys_fhreadlink(struct thread *td, struct fhreadlink_args *uap)
4590 if (uap->bufsize > IOSIZE_MAX)
4592 error = copyin(uap->fhp, &fh, sizeof(fh));
4601 error = kern_readlink_vp(vp, uap->buf, UIO_USERSPACE, uap->bufsize, td);
4620 sys_fhopen(struct thread *td, struct fhopen_args *uap)
4622 return (kern_fhopen(td, uap->u_fhp, uap->flags));
4708 sys_fhstat(struct thread *td, struct fhstat_args *uap)
4714 error = copyin(uap->u_fhp, &fh, sizeof(fh));
4719 error = copyout(&sb, uap->sb, sizeof(sb));
4754 sys_fhstatfs(struct thread *td, struct fhstatfs_args *uap)
4760 error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t));
4766 error = copyout(sfp, uap->buf, sizeof(*sfp));
4932 sys_posix_fadvise(struct thread *td, struct posix_fadvise_args *uap)
4936 error = kern_posix_fadvise(td, uap->fd, uap->offset, uap->len,
4937 uap->advice);
5064 sys_copy_file_range(struct thread *td, struct copy_file_range_args *uap)
5070 if (uap->inoffp != NULL) {
5071 error = copyin(uap->inoffp, &inoff, sizeof(off_t));
5076 if (uap->outoffp != NULL) {
5077 error = copyin(uap->outoffp, &outoff, sizeof(off_t));
5082 error = kern_copy_file_range(td, uap->infd, inoffp, uap->outfd,
5083 outoffp, uap->len, uap->flags);
5084 if (error == 0 && uap->inoffp != NULL)
5085 error = copyout(inoffp, uap->inoffp, sizeof(off_t));
5086 if (error == 0 && uap->outoffp != NULL)
5087 error = copyout(outoffp, uap->outoffp, sizeof(off_t));