Index: kern/vfs_syscalls.c =================================================================== --- kern/vfs_syscalls.c (revision 247917) +++ kern/vfs_syscalls.c (working copy) @@ -258,29 +258,33 @@ sf->f_bavail >>= shift; } +static void cvto2statfs(struct statfs *, struct o2statfs *); + /* * Get filesystem statistics. */ #ifndef _SYS_SYSPROTO_H_ -struct statfs_args { +struct o2statfs_args { char *path; - struct statfs *buf; + struct o2statfs *buf; }; #endif int -sys_statfs(td, uap) +sys_o2statfs(td, uap) struct thread *td; - register struct statfs_args /* { + register struct o2statfs_args /* { char *path; - struct statfs *buf; + struct o2statfs *buf; } */ *uap; { + struct o2statfs osf; struct statfs sf; int error; error = kern_statfs(td, uap->path, UIO_USERSPACE, &sf); + cvto2statfs(&sf, &osf); if (error == 0) - error = copyout(&sf, uap->buf, sizeof(sf)); + error = copyout(&osf, uap->buf, sizeof(osf)); return (error); } @@ -337,25 +341,27 @@ * Get filesystem statistics. */ #ifndef _SYS_SYSPROTO_H_ -struct fstatfs_args { +struct o2fstatfs_args { int fd; - struct statfs *buf; + struct 02statfs *buf; }; #endif int -sys_fstatfs(td, uap) +sys_o2fstatfs(td, uap) struct thread *td; - register struct fstatfs_args /* { + register struct o2fstatfs_args /* { int fd; - struct statfs *buf; + struct o2statfs *buf; } */ *uap; { + struct o2statfs osf; struct statfs sf; int error; error = kern_fstatfs(td, uap->fd, &sf); + cvto2statfs(&sf, &osf); if (error == 0) - error = copyout(&sf, uap->buf, sizeof(sf)); + error = copyout(&osf, uap->buf, sizeof(osf)); return (error); } @@ -422,21 +428,22 @@ * Get statistics on all filesystems. */ #ifndef _SYS_SYSPROTO_H_ -struct getfsstat_args { - struct statfs *buf; +struct o2getfsstat_args { + struct o2statfs *buf; long bufsize; int flags; }; #endif int -sys_getfsstat(td, uap) +sys_o2getfsstat(td, uap) struct thread *td; - register struct getfsstat_args /* { - struct statfs *buf; + register struct o2getfsstat_args /* { + struct o2statfs *buf; long bufsize; int flags; } */ *uap; { + /* DJA ??? */ return (kern_getfsstat(td, &uap->buf, uap->bufsize, UIO_USERSPACE, uap->flags)); @@ -448,10 +455,111 @@ * in '*buf'. */ int -kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, +kern_getfsstat(struct thread *td, struct o2statfs **buf, size_t bufsize, enum uio_seg bufseg, int flags) { struct mount *mp, *nmp; + struct o2statfs *sfsp, sb; + struct statfs *sp; + size_t count, maxcount; + int error; + + maxcount = bufsize / sizeof(struct o2statfs); + if (bufsize == 0) + sfsp = NULL; + else if (bufseg == UIO_USERSPACE) + sfsp = *buf; + else /* if (bufseg == UIO_SYSSPACE) */ { + count = 0; + mtx_lock(&mountlist_mtx); + TAILQ_FOREACH(mp, &mountlist, mnt_list) { + count++; + } + mtx_unlock(&mountlist_mtx); + if (maxcount > count) + maxcount = count; + sfsp = *buf = malloc(maxcount * sizeof(struct o2statfs), M_TEMP, + M_WAITOK); + } + count = 0; + mtx_lock(&mountlist_mtx); + for (mp = TAILQ_FIRST(&mountlist); mp != NULL; mp = nmp) { + if (prison_canseemount(td->td_ucred, mp) != 0) { + nmp = TAILQ_NEXT(mp, mnt_list); + continue; + } +#ifdef MAC + if (mac_mount_check_stat(td->td_ucred, mp) != 0) { + nmp = TAILQ_NEXT(mp, mnt_list); + continue; + } +#endif + if (vfs_busy(mp, MBF_NOWAIT | MBF_MNTLSTLOCK)) { + nmp = TAILQ_NEXT(mp, mnt_list); + continue; + } + if (sfsp && count < maxcount) { + sp = &mp->mnt_stat; + /* + * Set these in case the underlying filesystem + * fails to do so. + */ + sp->f_version = O2STATFS_VERSION; + sp->f_namemax = NAME_MAX; + sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; + /* + * If MNT_NOWAIT or MNT_LAZY is specified, do not + * refresh the fsstat cache. MNT_NOWAIT or MNT_LAZY + * overrides MNT_WAIT. + */ + if (((flags & (MNT_LAZY|MNT_NOWAIT)) == 0 || + (flags & MNT_WAIT)) && + (error = VFS_STATFS(mp, sp))) { + mtx_lock(&mountlist_mtx); + nmp = TAILQ_NEXT(mp, mnt_list); + vfs_unbusy(mp); + continue; + } + if (priv_check(td, PRIV_VFS_GENERATION)) { + cvto2statfs(sp, &sb); + sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; + prison_enforce_statfs(td->td_ucred, mp, sp); + cvto2statfs(sp, &sb); + } + if (bufseg == UIO_SYSSPACE) + bcopy(sp, sfsp, sizeof(*sp)); + else /* if (bufseg == UIO_USERSPACE) */ { + cvto2statfs(sp, &sb); + error = copyout(&sb, sfsp, sizeof(sb)); + if (error) { + vfs_unbusy(mp); + return (error); + } + } + sfsp++; + } + count++; + mtx_lock(&mountlist_mtx); + nmp = TAILQ_NEXT(mp, mnt_list); + vfs_unbusy(mp); + } + mtx_unlock(&mountlist_mtx); + if (sfsp && count > maxcount) + td->td_retval[0] = maxcount; + else + td->td_retval[0] = count; + return (0); +} +/* + * If (bufsize > 0 && bufseg == UIO_SYSSPACE) + * The caller is responsible for freeing memory which will be allocated + * in '*buf'. + */ +int +kern_ngetfsstat(struct thread *td, struct statfs **buf, size_t bufsize, + enum uio_seg bufseg, int flags) +{ + struct mount *mp, *nmp; struct statfs *sfsp, *sp, sb; size_t count, maxcount; int error; @@ -627,7 +735,7 @@ count = uap->bufsize / sizeof(struct ostatfs); size = count * sizeof(struct statfs); - error = kern_getfsstat(td, &buf, size, UIO_SYSSPACE, uap->flags); + error = kern_ngetfsstat(td, &buf, size, UIO_SYSSPACE, uap->flags); if (size > 0) { count = td->td_retval[0]; sp = buf; @@ -4421,19 +4529,20 @@ * Implement fstatfs() for (NFS) file handles. */ #ifndef _SYS_SYSPROTO_H_ -struct fhstatfs_args { +struct o2fhstatfs_args { struct fhandle *u_fhp; - struct statfs *buf; + struct o2statfs *buf; }; #endif int -sys_fhstatfs(td, uap) +sys_o2fhstatfs(td, uap) struct thread *td; - struct fhstatfs_args /* { + struct o2fhstatfs_args /* { struct fhandle *u_fhp; - struct statfs *buf; + struct o2statfs *buf; } */ *uap; { + struct o2statfs osf; struct statfs sf; fhandle_t fh; int error; @@ -4444,7 +4553,8 @@ error = kern_fhstatfs(td, fh, &sf); if (error) return (error); - return (copyout(&sf, uap->buf, sizeof(sf))); + cvto2statfs(&sf, &osf); + return (copyout(&osf, uap->buf, sizeof(osf))); } int @@ -4716,3 +4826,146 @@ return (kern_posix_fadvise(td, uap->fd, uap->offset, uap->len, uap->advice)); } + +/* DJA */ + +/* + * Get statistics on all filesystems. + */ +#ifndef _SYS_SYSPROTO_H_ +struct getfsstat_args { + struct statfs *buf; + long bufsize; + int flags; +}; +#endif +int +sys_getfsstat(td, uap) + struct thread *td; + register struct getfsstat_args /* { + struct statfs *buf; + long bufsize; + int flags; + } */ *uap; +{ + + return (kern_ngetfsstat(td, &uap->buf, uap->bufsize, UIO_USERSPACE, + uap->flags)); +} + +/* + * Get filesystem statistics. + */ +#ifndef _SYS_SYSPROTO_H_ +struct statfs_args { + char *path; + struct statfs *buf; +}; +#endif +int +sys_statfs(td, uap) + struct thread *td; + register struct statfs_args /* { + char *path; + struct statfs *buf; + } */ *uap; +{ + struct statfs sf; + int error; + + error = kern_statfs(td, uap->path, UIO_USERSPACE, &sf); + if (error == 0) + error = copyout(&sf, uap->buf, sizeof(sf)); + return (error); +} + +/* + * Get filesystem statistics. + */ +#ifndef _SYS_SYSPROTO_H_ +struct fstatfs_args { + int fd; + struct statfs *buf; +}; +#endif +int +sys_fstatfs(td, uap) + struct thread *td; + register struct fstatfs_args /* { + int fd; + struct statfs *buf; + } */ *uap; +{ + struct statfs sf; + int error; + + error = kern_fstatfs(td, uap->fd, &sf); + if (error == 0) + error = copyout(&sf, uap->buf, sizeof(sf)); + return (error); +} + +/* + * Implement fstatfs() for (NFS) file handles. + */ +#ifndef _SYS_SYSPROTO_H_ +struct fhstatfs_args { + struct fhandle *u_fhp; + struct statfs *buf; +}; +#endif +int +sys_fhstatfs(td, uap) + struct thread *td; + struct fhstatfs_args /* { + struct fhandle *u_fhp; + struct statfs *buf; + } */ *uap; +{ + struct statfs sf; + fhandle_t fh; + int error; + + error = copyin(uap->u_fhp, &fh, sizeof(fhandle_t)); + if (error) + return (error); + error = kern_fhstatfs(td, fh, &sf); + if (error) + return (error); + return (copyout(&sf, uap->buf, sizeof(sf))); +} + +/* + * Convert a new format statfs structure to an old format statfs structure. + */ +static void +cvto2statfs(nsp, osp) + struct statfs *nsp; + struct o2statfs *osp; +{ + + statfs_scale_blocks(nsp, LONG_MAX); /* DJA ??? */ + bzero(osp, sizeof(*osp)); + osp->f_bsize = nsp->f_bsize; + osp->f_iosize = nsp->f_iosize; + osp->f_blocks = nsp->f_blocks; + osp->f_bfree = nsp->f_bfree; + osp->f_bavail = nsp->f_bavail; + osp->f_files = nsp->f_files; + osp->f_ffree = nsp->f_ffree; + osp->f_owner = nsp->f_owner; + osp->f_type = nsp->f_type; + osp->f_flags = nsp->f_flags; + osp->f_syncwrites = MIN(nsp->f_syncwrites, LONG_MAX); + osp->f_asyncwrites = MIN(nsp->f_asyncwrites, LONG_MAX); + osp->f_syncreads = MIN(nsp->f_syncreads, LONG_MAX); + osp->f_asyncreads = MIN(nsp->f_asyncreads, LONG_MAX); + strlcpy(osp->f_fstypename, nsp->f_fstypename, + MIN(MFSNAMELEN, O2MFSNAMELEN)); + strlcpy(osp->f_mntonname, nsp->f_mntonname, + MIN(MNAMELEN, O2MNAMELEN)); + strlcpy(osp->f_mntfromname, nsp->f_mntfromname, + MIN(MNAMELEN, OMNAMELEN)); + osp->f_fsid = nsp->f_fsid; +} + Index: kern/init_sysent.c =================================================================== --- kern/init_sysent.c (revision 247917) +++ kern/init_sysent.c (working copy) @@ -429,10 +429,10 @@ { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 392 = uuidgen */ { AS(sendfile_args), (sy_call_t *)sys_sendfile, AUE_SENDFILE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 393 = sendfile */ { AS(mac_syscall_args), (sy_call_t *)sys_mac_syscall, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 394 = mac_syscall */ - { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = getfsstat */ - { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = statfs */ - { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 397 = fstatfs */ - { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = fhstatfs */ + { AS(o2getfsstat_args), (sy_call_t *)sys_o2getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = o2getfsstat */ + { AS(o2statfs_args), (sy_call_t *)sys_o2statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = o2statfs */ + { AS(o2fstatfs_args), (sy_call_t *)sys_o2fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 397 = o2fstatfs */ + { AS(o2fhstatfs_args), (sy_call_t *)sys_o2fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = o2fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = ksem_close */ { AS(ksem_post_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 401 = ksem_post */ @@ -566,12 +566,16 @@ { AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ { AS(posix_fallocate_args), (sy_call_t *)sys_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = posix_fallocate */ { AS(posix_fadvise_args), (sy_call_t *)sys_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = posix_fadvise */ - { AS(wait6_args), (sy_call_t *)sys_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = wait6 */ - { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 533 = cap_rights_limit */ - { AS(cap_ioctls_limit_args), (sy_call_t *)sys_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 534 = cap_ioctls_limit */ - { AS(cap_ioctls_get_args), (sy_call_t *)sys_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 535 = cap_ioctls_get */ - { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ - { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 537 = cap_fcntls_get */ - { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 538 = bindat */ - { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 539 = connectat */ + { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = getfsstat */ + { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = statfs */ + { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 534 = fstatfs */ + { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = fhstatfs */ + { AS(wait6_args), (sy_call_t *)sys_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = wait6 */ + { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 537 = cap_rights_limit */ + { AS(cap_ioctls_limit_args), (sy_call_t *)sys_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 538 = cap_ioctls_limit */ + { AS(cap_ioctls_get_args), (sy_call_t *)sys_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 539 = cap_ioctls_get */ + { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 540 = cap_fcntls_limit */ + { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 541 = cap_fcntls_get */ + { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 542 = bindat */ + { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 543 = connectat */ }; Index: kern/syscalls.c =================================================================== --- kern/syscalls.c (revision 247917) +++ kern/syscalls.c (working copy) @@ -402,10 +402,10 @@ "uuidgen", /* 392 = uuidgen */ "sendfile", /* 393 = sendfile */ "mac_syscall", /* 394 = mac_syscall */ - "getfsstat", /* 395 = getfsstat */ - "statfs", /* 396 = statfs */ - "fstatfs", /* 397 = fstatfs */ - "fhstatfs", /* 398 = fhstatfs */ + "o2getfsstat", /* 395 = o2getfsstat */ + "o2statfs", /* 396 = o2statfs */ + "o2fstatfs", /* 397 = o2fstatfs */ + "o2fhstatfs", /* 398 = o2fhstatfs */ "#399", /* 399 = nosys */ "ksem_close", /* 400 = ksem_close */ "ksem_post", /* 401 = ksem_post */ @@ -539,12 +539,16 @@ "rctl_remove_rule", /* 529 = rctl_remove_rule */ "posix_fallocate", /* 530 = posix_fallocate */ "posix_fadvise", /* 531 = posix_fadvise */ - "wait6", /* 532 = wait6 */ - "cap_rights_limit", /* 533 = cap_rights_limit */ - "cap_ioctls_limit", /* 534 = cap_ioctls_limit */ - "cap_ioctls_get", /* 535 = cap_ioctls_get */ - "cap_fcntls_limit", /* 536 = cap_fcntls_limit */ - "cap_fcntls_get", /* 537 = cap_fcntls_get */ - "bindat", /* 538 = bindat */ - "connectat", /* 539 = connectat */ + "getfsstat", /* 532 = getfsstat */ + "statfs", /* 533 = statfs */ + "fstatfs", /* 534 = fstatfs */ + "fhstatfs", /* 535 = fhstatfs */ + "wait6", /* 536 = wait6 */ + "cap_rights_limit", /* 537 = cap_rights_limit */ + "cap_ioctls_limit", /* 538 = cap_ioctls_limit */ + "cap_ioctls_get", /* 539 = cap_ioctls_get */ + "cap_fcntls_limit", /* 540 = cap_fcntls_limit */ + "cap_fcntls_get", /* 541 = cap_fcntls_get */ + "bindat", /* 542 = bindat */ + "connectat", /* 543 = connectat */ }; Index: kern/syscalls.master =================================================================== --- kern/syscalls.master (revision 247917) +++ kern/syscalls.master (working copy) @@ -704,13 +704,13 @@ off_t *sbytes, int flags); } 394 AUE_NULL STD { int mac_syscall(const char *policy, \ int call, void *arg); } -395 AUE_GETFSSTAT STD { int getfsstat(struct statfs *buf, \ +395 AUE_GETFSSTAT STD { int o2getfsstat(struct o2statfs *buf, \ long bufsize, int flags); } -396 AUE_STATFS STD { int statfs(char *path, \ - struct statfs *buf); } -397 AUE_FSTATFS STD { int fstatfs(int fd, struct statfs *buf); } -398 AUE_FHSTATFS STD { int fhstatfs(const struct fhandle *u_fhp, \ - struct statfs *buf); } +396 AUE_STATFS STD { int o2statfs(char *path, \ + struct o2statfs *buf); } +397 AUE_FSTATFS STD { int o2fstatfs(int fd, struct o2statfs *buf); } +398 AUE_FHSTATFS STD { int o2fhstatfs(const struct fhandle *u_fhp, \ + struct o2statfs *buf); } 399 AUE_NULL UNIMPL nosys 400 AUE_NULL NOSTD { int ksem_close(semid_t id); } 401 AUE_NULL NOSTD { int ksem_post(semid_t id); } @@ -951,23 +951,30 @@ off_t offset, off_t len); } 531 AUE_NULL STD { int posix_fadvise(int fd, off_t offset, \ off_t len, int advice); } -532 AUE_WAIT6 STD { int wait6(int idtype, int id, \ +532 AUE_GETFSSTAT STD { int getfsstat(struct statfs *buf, \ + long bufsize, int flags); } +533 AUE_STATFS STD { int statfs(char *path, \ + struct statfs *buf); } +534 AUE_FSTATFS STD { int fstatfs(int fd, struct statfs *buf); } +535 AUE_FHSTATFS STD { int fhstatfs(const struct fhandle *u_fhp, \ + struct statfs *buf); } +536 AUE_WAIT6 STD { int wait6(int idtype, int id, \ int *status, int options, \ struct __wrusage *wrusage, \ siginfo_t *info); } -533 AUE_CAP_RIGHTS_LIMIT STD { int cap_rights_limit(int fd, \ +537 AUE_CAP_RIGHTS_LIMIT STD { int cap_rights_limit(int fd, \ uint64_t rights); } -534 AUE_CAP_IOCTLS_LIMIT STD { int cap_ioctls_limit(int fd, \ +538 AUE_CAP_IOCTLS_LIMIT STD { int cap_ioctls_limit(int fd, \ const u_long *cmds, size_t ncmds); } -535 AUE_CAP_IOCTLS_GET STD { ssize_t cap_ioctls_get(int fd, \ +539 AUE_CAP_IOCTLS_GET STD { ssize_t cap_ioctls_get(int fd, \ u_long *cmds, size_t maxcmds); } -536 AUE_CAP_FCNTLS_LIMIT STD { int cap_fcntls_limit(int fd, \ +540 AUE_CAP_FCNTLS_LIMIT STD { int cap_fcntls_limit(int fd, \ uint32_t fcntlrights); } -537 AUE_CAP_FCNTLS_GET STD { int cap_fcntls_get(int fd, \ +541 AUE_CAP_FCNTLS_GET STD { int cap_fcntls_get(int fd, \ uint32_t *fcntlrightsp); } -538 AUE_BINDAT STD { int bindat(int fd, int s, caddr_t name, \ +542 AUE_BINDAT STD { int bindat(int fd, int s, caddr_t name, \ int namelen); } -539 AUE_CONNECTAT STD { int connectat(int fd, int s, caddr_t name, \ +543 AUE_CONNECTAT STD { int connectat(int fd, int s, caddr_t name, \ int namelen); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Index: kern/systrace_args.c =================================================================== --- kern/systrace_args.c (revision 247917) +++ kern/systrace_args.c (working copy) @@ -2168,36 +2168,36 @@ *n_args = 3; break; } - /* getfsstat */ + /* o2getfsstat */ case 395: { - struct getfsstat_args *p = params; - uarg[0] = (intptr_t) p->buf; /* struct statfs * */ + struct o2getfsstat_args *p = params; + uarg[0] = (intptr_t) p->buf; /* struct o2statfs * */ iarg[1] = p->bufsize; /* long */ iarg[2] = p->flags; /* int */ *n_args = 3; break; } - /* statfs */ + /* o2statfs */ case 396: { - struct statfs_args *p = params; + struct o2statfs_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + uarg[1] = (intptr_t) p->buf; /* struct o2statfs * */ *n_args = 2; break; } - /* fstatfs */ + /* o2fstatfs */ case 397: { - struct fstatfs_args *p = params; + struct o2fstatfs_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + uarg[1] = (intptr_t) p->buf; /* struct o2statfs * */ *n_args = 2; break; } - /* fhstatfs */ + /* o2fhstatfs */ case 398: { - struct fhstatfs_args *p = params; + struct o2fhstatfs_args *p = params; uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + uarg[1] = (intptr_t) p->buf; /* struct o2statfs * */ *n_args = 2; break; } @@ -3274,8 +3274,41 @@ *n_args = 4; break; } + /* getfsstat */ + case 532: { + struct getfsstat_args *p = params; + uarg[0] = (intptr_t) p->buf; /* struct statfs * */ + iarg[1] = p->bufsize; /* long */ + iarg[2] = p->flags; /* int */ + *n_args = 3; + break; + } + /* statfs */ + case 533: { + struct statfs_args *p = params; + uarg[0] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + *n_args = 2; + break; + } + /* fstatfs */ + case 534: { + struct fstatfs_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + *n_args = 2; + break; + } + /* fhstatfs */ + case 535: { + struct fhstatfs_args *p = params; + uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ + uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + *n_args = 2; + break; + } /* wait6 */ - case 532: { + case 536: { struct wait6_args *p = params; iarg[0] = p->idtype; /* int */ iarg[1] = p->id; /* int */ @@ -3287,7 +3320,7 @@ break; } /* cap_rights_limit */ - case 533: { + case 537: { struct cap_rights_limit_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = p->rights; /* uint64_t */ @@ -3295,7 +3328,7 @@ break; } /* cap_ioctls_limit */ - case 534: { + case 538: { struct cap_ioctls_limit_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->cmds; /* const u_long * */ @@ -3304,7 +3337,7 @@ break; } /* cap_ioctls_get */ - case 535: { + case 539: { struct cap_ioctls_get_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->cmds; /* u_long * */ @@ -3313,7 +3346,7 @@ break; } /* cap_fcntls_limit */ - case 536: { + case 540: { struct cap_fcntls_limit_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = p->fcntlrights; /* uint32_t */ @@ -3321,7 +3354,7 @@ break; } /* cap_fcntls_get */ - case 537: { + case 541: { struct cap_fcntls_get_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->fcntlrightsp; /* uint32_t * */ @@ -3329,7 +3362,7 @@ break; } /* bindat */ - case 538: { + case 542: { struct bindat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ @@ -3339,7 +3372,7 @@ break; } /* connectat */ - case 539: { + case 543: { struct connectat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ @@ -6862,11 +6895,11 @@ break; }; break; - /* getfsstat */ + /* o2getfsstat */ case 395: switch(ndx) { case 0: - p = "struct statfs *"; + p = "struct o2statfs *"; break; case 1: p = "long"; @@ -6878,40 +6911,40 @@ break; }; break; - /* statfs */ + /* o2statfs */ case 396: switch(ndx) { case 0: p = "char *"; break; case 1: - p = "struct statfs *"; + p = "struct o2statfs *"; break; default: break; }; break; - /* fstatfs */ + /* o2fstatfs */ case 397: switch(ndx) { case 0: p = "int"; break; case 1: - p = "struct statfs *"; + p = "struct o2statfs *"; break; default: break; }; break; - /* fhstatfs */ + /* o2fhstatfs */ case 398: switch(ndx) { case 0: p = "const struct fhandle *"; break; case 1: - p = "struct statfs *"; + p = "struct o2statfs *"; break; default: break; @@ -8782,15 +8815,70 @@ break; }; break; - /* wait6 */ + /* getfsstat */ case 532: switch(ndx) { case 0: + p = "struct statfs *"; + break; + case 1: + p = "long"; + break; + case 2: p = "int"; break; + default: + break; + }; + break; + /* statfs */ + case 533: + switch(ndx) { + case 0: + p = "char *"; + break; case 1: + p = "struct statfs *"; + break; + default: + break; + }; + break; + /* fstatfs */ + case 534: + switch(ndx) { + case 0: p = "int"; break; + case 1: + p = "struct statfs *"; + break; + default: + break; + }; + break; + /* fhstatfs */ + case 535: + switch(ndx) { + case 0: + p = "const struct fhandle *"; + break; + case 1: + p = "struct statfs *"; + break; + default: + break; + }; + break; + /* wait6 */ + case 536: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; case 2: p = "int *"; break; @@ -8808,7 +8896,7 @@ }; break; /* cap_rights_limit */ - case 533: + case 537: switch(ndx) { case 0: p = "int"; @@ -8821,7 +8909,7 @@ }; break; /* cap_ioctls_limit */ - case 534: + case 538: switch(ndx) { case 0: p = "int"; @@ -8837,7 +8925,7 @@ }; break; /* cap_ioctls_get */ - case 535: + case 539: switch(ndx) { case 0: p = "int"; @@ -8853,7 +8941,7 @@ }; break; /* cap_fcntls_limit */ - case 536: + case 540: switch(ndx) { case 0: p = "int"; @@ -8866,7 +8954,7 @@ }; break; /* cap_fcntls_get */ - case 537: + case 541: switch(ndx) { case 0: p = "int"; @@ -8879,7 +8967,7 @@ }; break; /* bindat */ - case 538: + case 542: switch(ndx) { case 0: p = "int"; @@ -8898,7 +8986,7 @@ }; break; /* connectat */ - case 539: + case 543: switch(ndx) { case 0: p = "int"; @@ -10172,22 +10260,22 @@ if (ndx == 0 || ndx == 1) p = "int"; break; - /* getfsstat */ + /* o2getfsstat */ case 395: if (ndx == 0 || ndx == 1) p = "int"; break; - /* statfs */ + /* o2statfs */ case 396: if (ndx == 0 || ndx == 1) p = "int"; break; - /* fstatfs */ + /* o2fstatfs */ case 397: if (ndx == 0 || ndx == 1) p = "int"; break; - /* fhstatfs */ + /* o2fhstatfs */ case 398: if (ndx == 0 || ndx == 1) p = "int"; @@ -10804,43 +10892,63 @@ if (ndx == 0 || ndx == 1) p = "int"; break; - /* wait6 */ + /* getfsstat */ case 532: if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_rights_limit */ + /* statfs */ case 533: if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_ioctls_limit */ + /* fstatfs */ case 534: if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_ioctls_get */ + /* fhstatfs */ case 535: if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* wait6 */ + case 536: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* cap_rights_limit */ + case 537: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* cap_ioctls_limit */ + case 538: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* cap_ioctls_get */ + case 539: + if (ndx == 0 || ndx == 1) p = "ssize_t"; break; /* cap_fcntls_limit */ - case 536: + case 540: if (ndx == 0 || ndx == 1) p = "int"; break; /* cap_fcntls_get */ - case 537: + case 541: if (ndx == 0 || ndx == 1) p = "int"; break; /* bindat */ - case 538: + case 542: if (ndx == 0 || ndx == 1) p = "int"; break; /* connectat */ - case 539: + case 543: if (ndx == 0 || ndx == 1) p = "int"; break; Index: compat/freebsd32/syscalls.master =================================================================== --- compat/freebsd32/syscalls.master (revision 247917) +++ compat/freebsd32/syscalls.master (working copy) @@ -701,13 +701,13 @@ size_t nbytes, struct sf_hdtr32 *hdtr, \ off_t *sbytes, int flags); } 394 AUE_NULL UNIMPL mac_syscall -395 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs *buf, \ +395 AUE_GETFSSTAT NOPROTO { int o2getfsstat(struct o2statfs *buf, \ long bufsize, int flags); } -396 AUE_STATFS NOPROTO { int statfs(char *path, \ - struct statfs *buf); } -397 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs *buf); } -398 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ - struct statfs *buf); } +396 AUE_STATFS NOPROTO { int o2statfs(char *path, \ + struct o2statfs *buf); } +397 AUE_FSTATFS NOPROTO { int o2fstatfs(int fd, struct o2statfs *buf); } +398 AUE_FHSTATFS NOPROTO { int o2fhstatfs(const struct fhandle *u_fhp, \ + struct o2statfs *buf); } 399 AUE_NULL UNIMPL nosys 400 AUE_NULL NOSTD|NOPROTO { int ksem_close(semid_t id); } 401 AUE_NULL NOSTD|NOPROTO { int ksem_post(semid_t id); } @@ -1000,22 +1000,29 @@ uint32_t offset1, uint32_t offset2,\ uint32_t len1, uint32_t len2, \ int advice); } -532 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int id, \ +532 AUE_GETFSSTAT NOPROTO { int getfsstat(struct statfs *buf, \ + long bufsize, int flags); } +533 AUE_STATFS NOPROTO { int statfs(char *path, \ + struct statfs *buf); } +534 AUE_FSTATFS NOPROTO { int fstatfs(int fd, struct statfs *buf); } +535 AUE_FHSTATFS NOPROTO { int fhstatfs(const struct fhandle *u_fhp, \ + struct statfs *buf); } +536 AUE_WAIT6 STD { int freebsd32_wait6(int idtype, int id, \ int *status, int options, \ struct wrusage32 *wrusage, \ siginfo_t *info); } -533 AUE_CAP_RIGHTS_LIMIT NOPROTO { int cap_rights_limit(int fd, \ +537 AUE_CAP_RIGHTS_LIMIT NOPROTO { int cap_rights_limit(int fd, \ uint64_t rights); } -534 AUE_CAP_IOCTLS_LIMIT NOPROTO { int cap_ioctls_limit(int fd, \ +538 AUE_CAP_IOCTLS_LIMIT NOPROTO { int cap_ioctls_limit(int fd, \ const u_long *cmds, size_t ncmds); } -535 AUE_CAP_IOCTLS_GET NOPROTO { ssize_t cap_ioctls_get(int fd, \ +539 AUE_CAP_IOCTLS_GET NOPROTO { ssize_t cap_ioctls_get(int fd, \ u_long *cmds, size_t maxcmds); } -536 AUE_CAP_FCNTLS_LIMIT NOPROTO { int cap_fcntls_limit(int fd, \ +540 AUE_CAP_FCNTLS_LIMIT NOPROTO { int cap_fcntls_limit(int fd, \ uint32_t fcntlrights); } -537 AUE_CAP_FCNTLS_GET NOPROTO { int cap_fcntls_get(int fd, \ +541 AUE_CAP_FCNTLS_GET NOPROTO { int cap_fcntls_get(int fd, \ uint32_t *fcntlrightsp); } -538 AUE_BINDAT NOPROTO { int bindat(int fd, int s, caddr_t name, \ +542 AUE_BINDAT NOPROTO { int bindat(int fd, int s, caddr_t name, \ int namelen); } -539 AUE_CONNECTAT NOPROTO { int connectat(int fd, int s, caddr_t name, \ +543 AUE_CONNECTAT NOPROTO { int connectat(int fd, int s, caddr_t name, \ int namelen); } Index: compat/freebsd32/freebsd32_systrace_args.c =================================================================== --- compat/freebsd32/freebsd32_systrace_args.c (revision 247917) +++ compat/freebsd32/freebsd32_systrace_args.c (working copy) @@ -1951,36 +1951,36 @@ *n_args = 8; break; } - /* getfsstat */ + /* o2getfsstat */ case 395: { - struct getfsstat_args *p = params; - uarg[0] = (intptr_t) p->buf; /* struct statfs * */ + struct o2getfsstat_args *p = params; + uarg[0] = (intptr_t) p->buf; /* struct o2statfs * */ iarg[1] = p->bufsize; /* long */ iarg[2] = p->flags; /* int */ *n_args = 3; break; } - /* statfs */ + /* o2statfs */ case 396: { - struct statfs_args *p = params; + struct o2statfs_args *p = params; uarg[0] = (intptr_t) p->path; /* char * */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + uarg[1] = (intptr_t) p->buf; /* struct o2statfs * */ *n_args = 2; break; } - /* fstatfs */ + /* o2fstatfs */ case 397: { - struct fstatfs_args *p = params; + struct o2fstatfs_args *p = params; iarg[0] = p->fd; /* int */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + uarg[1] = (intptr_t) p->buf; /* struct o2statfs * */ *n_args = 2; break; } - /* fhstatfs */ + /* o2fhstatfs */ case 398: { - struct fhstatfs_args *p = params; + struct o2fhstatfs_args *p = params; uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ - uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + uarg[1] = (intptr_t) p->buf; /* struct o2statfs * */ *n_args = 2; break; } @@ -3076,8 +3076,41 @@ *n_args = 6; break; } + /* getfsstat */ + case 532: { + struct getfsstat_args *p = params; + uarg[0] = (intptr_t) p->buf; /* struct statfs * */ + iarg[1] = p->bufsize; /* long */ + iarg[2] = p->flags; /* int */ + *n_args = 3; + break; + } + /* statfs */ + case 533: { + struct statfs_args *p = params; + uarg[0] = (intptr_t) p->path; /* char * */ + uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + *n_args = 2; + break; + } + /* fstatfs */ + case 534: { + struct fstatfs_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + *n_args = 2; + break; + } + /* fhstatfs */ + case 535: { + struct fhstatfs_args *p = params; + uarg[0] = (intptr_t) p->u_fhp; /* const struct fhandle * */ + uarg[1] = (intptr_t) p->buf; /* struct statfs * */ + *n_args = 2; + break; + } /* freebsd32_wait6 */ - case 532: { + case 536: { struct freebsd32_wait6_args *p = params; iarg[0] = p->idtype; /* int */ iarg[1] = p->id; /* int */ @@ -3089,7 +3122,7 @@ break; } /* cap_rights_limit */ - case 533: { + case 537: { struct cap_rights_limit_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = p->rights; /* uint64_t */ @@ -3097,7 +3130,7 @@ break; } /* cap_ioctls_limit */ - case 534: { + case 538: { struct cap_ioctls_limit_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->cmds; /* const u_long * */ @@ -3106,7 +3139,7 @@ break; } /* cap_ioctls_get */ - case 535: { + case 539: { struct cap_ioctls_get_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->cmds; /* u_long * */ @@ -3115,7 +3148,7 @@ break; } /* cap_fcntls_limit */ - case 536: { + case 540: { struct cap_fcntls_limit_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = p->fcntlrights; /* uint32_t */ @@ -3123,7 +3156,7 @@ break; } /* cap_fcntls_get */ - case 537: { + case 541: { struct cap_fcntls_get_args *p = params; iarg[0] = p->fd; /* int */ uarg[1] = (intptr_t) p->fcntlrightsp; /* uint32_t * */ @@ -3131,7 +3164,7 @@ break; } /* bindat */ - case 538: { + case 542: { struct bindat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ @@ -3141,7 +3174,7 @@ break; } /* connectat */ - case 539: { + case 543: { struct connectat_args *p = params; iarg[0] = p->fd; /* int */ iarg[1] = p->s; /* int */ @@ -6282,11 +6315,11 @@ break; }; break; - /* getfsstat */ + /* o2getfsstat */ case 395: switch(ndx) { case 0: - p = "struct statfs *"; + p = "struct o2statfs *"; break; case 1: p = "long"; @@ -6298,40 +6331,40 @@ break; }; break; - /* statfs */ + /* o2statfs */ case 396: switch(ndx) { case 0: p = "char *"; break; case 1: - p = "struct statfs *"; + p = "struct o2statfs *"; break; default: break; }; break; - /* fstatfs */ + /* o2fstatfs */ case 397: switch(ndx) { case 0: p = "int"; break; case 1: - p = "struct statfs *"; + p = "struct o2statfs *"; break; default: break; }; break; - /* fhstatfs */ + /* o2fhstatfs */ case 398: switch(ndx) { case 0: p = "const struct fhandle *"; break; case 1: - p = "struct statfs *"; + p = "struct o2statfs *"; break; default: break; @@ -8280,15 +8313,70 @@ break; }; break; - /* freebsd32_wait6 */ + /* getfsstat */ case 532: switch(ndx) { case 0: + p = "struct statfs *"; + break; + case 1: + p = "long"; + break; + case 2: p = "int"; break; + default: + break; + }; + break; + /* statfs */ + case 533: + switch(ndx) { + case 0: + p = "char *"; + break; case 1: + p = "struct statfs *"; + break; + default: + break; + }; + break; + /* fstatfs */ + case 534: + switch(ndx) { + case 0: p = "int"; break; + case 1: + p = "struct statfs *"; + break; + default: + break; + }; + break; + /* fhstatfs */ + case 535: + switch(ndx) { + case 0: + p = "const struct fhandle *"; + break; + case 1: + p = "struct statfs *"; + break; + default: + break; + }; + break; + /* freebsd32_wait6 */ + case 536: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "int"; + break; case 2: p = "int *"; break; @@ -8306,7 +8394,7 @@ }; break; /* cap_rights_limit */ - case 533: + case 537: switch(ndx) { case 0: p = "int"; @@ -8319,7 +8407,7 @@ }; break; /* cap_ioctls_limit */ - case 534: + case 538: switch(ndx) { case 0: p = "int"; @@ -8335,7 +8423,7 @@ }; break; /* cap_ioctls_get */ - case 535: + case 539: switch(ndx) { case 0: p = "int"; @@ -8351,7 +8439,7 @@ }; break; /* cap_fcntls_limit */ - case 536: + case 540: switch(ndx) { case 0: p = "int"; @@ -8364,7 +8452,7 @@ }; break; /* cap_fcntls_get */ - case 537: + case 541: switch(ndx) { case 0: p = "int"; @@ -8377,7 +8465,7 @@ }; break; /* bindat */ - case 538: + case 542: switch(ndx) { case 0: p = "int"; @@ -8396,7 +8484,7 @@ }; break; /* connectat */ - case 539: + case 543: switch(ndx) { case 0: p = "int"; @@ -9548,22 +9636,22 @@ if (ndx == 0 || ndx == 1) p = "int"; break; - /* getfsstat */ + /* o2getfsstat */ case 395: if (ndx == 0 || ndx == 1) p = "int"; break; - /* statfs */ + /* o2statfs */ case 396: if (ndx == 0 || ndx == 1) p = "int"; break; - /* fstatfs */ + /* o2fstatfs */ case 397: if (ndx == 0 || ndx == 1) p = "int"; break; - /* fhstatfs */ + /* o2fhstatfs */ case 398: if (ndx == 0 || ndx == 1) p = "int"; @@ -10171,43 +10259,63 @@ if (ndx == 0 || ndx == 1) p = "int"; break; - /* freebsd32_wait6 */ + /* getfsstat */ case 532: if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_rights_limit */ + /* statfs */ case 533: if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_ioctls_limit */ + /* fstatfs */ case 534: if (ndx == 0 || ndx == 1) p = "int"; break; - /* cap_ioctls_get */ + /* fhstatfs */ case 535: if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* freebsd32_wait6 */ + case 536: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* cap_rights_limit */ + case 537: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* cap_ioctls_limit */ + case 538: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* cap_ioctls_get */ + case 539: + if (ndx == 0 || ndx == 1) p = "ssize_t"; break; /* cap_fcntls_limit */ - case 536: + case 540: if (ndx == 0 || ndx == 1) p = "int"; break; /* cap_fcntls_get */ - case 537: + case 541: if (ndx == 0 || ndx == 1) p = "int"; break; /* bindat */ - case 538: + case 542: if (ndx == 0 || ndx == 1) p = "int"; break; /* connectat */ - case 539: + case 543: if (ndx == 0 || ndx == 1) p = "int"; break; Index: compat/freebsd32/freebsd32_syscall.h =================================================================== --- compat/freebsd32/freebsd32_syscall.h (revision 247917) +++ compat/freebsd32/freebsd32_syscall.h (working copy) @@ -305,10 +305,10 @@ #define FREEBSD32_SYS_lchflags 391 #define FREEBSD32_SYS_uuidgen 392 #define FREEBSD32_SYS_freebsd32_sendfile 393 -#define FREEBSD32_SYS_getfsstat 395 -#define FREEBSD32_SYS_statfs 396 -#define FREEBSD32_SYS_fstatfs 397 -#define FREEBSD32_SYS_fhstatfs 398 +#define FREEBSD32_SYS_o2getfsstat 395 +#define FREEBSD32_SYS_o2statfs 396 +#define FREEBSD32_SYS_o2fstatfs 397 +#define FREEBSD32_SYS_o2fhstatfs 398 #define FREEBSD32_SYS_ksem_close 400 #define FREEBSD32_SYS_ksem_post 401 #define FREEBSD32_SYS_ksem_wait 402 @@ -429,12 +429,16 @@ #define FREEBSD32_SYS_rctl_remove_rule 529 #define FREEBSD32_SYS_freebsd32_posix_fallocate 530 #define FREEBSD32_SYS_freebsd32_posix_fadvise 531 -#define FREEBSD32_SYS_freebsd32_wait6 532 -#define FREEBSD32_SYS_cap_rights_limit 533 -#define FREEBSD32_SYS_cap_ioctls_limit 534 -#define FREEBSD32_SYS_cap_ioctls_get 535 -#define FREEBSD32_SYS_cap_fcntls_limit 536 -#define FREEBSD32_SYS_cap_fcntls_get 537 -#define FREEBSD32_SYS_bindat 538 -#define FREEBSD32_SYS_connectat 539 -#define FREEBSD32_SYS_MAXSYSCALL 540 +#define FREEBSD32_SYS_getfsstat 532 +#define FREEBSD32_SYS_statfs 533 +#define FREEBSD32_SYS_fstatfs 534 +#define FREEBSD32_SYS_fhstatfs 535 +#define FREEBSD32_SYS_freebsd32_wait6 536 +#define FREEBSD32_SYS_cap_rights_limit 537 +#define FREEBSD32_SYS_cap_ioctls_limit 538 +#define FREEBSD32_SYS_cap_ioctls_get 539 +#define FREEBSD32_SYS_cap_fcntls_limit 540 +#define FREEBSD32_SYS_cap_fcntls_get 541 +#define FREEBSD32_SYS_bindat 542 +#define FREEBSD32_SYS_connectat 543 +#define FREEBSD32_SYS_MAXSYSCALL 544 Index: compat/freebsd32/freebsd32_sysent.c =================================================================== --- compat/freebsd32/freebsd32_sysent.c (revision 247917) +++ compat/freebsd32/freebsd32_sysent.c (working copy) @@ -442,10 +442,10 @@ { AS(uuidgen_args), (sy_call_t *)sys_uuidgen, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 392 = uuidgen */ { AS(freebsd32_sendfile_args), (sy_call_t *)freebsd32_sendfile, AUE_SENDFILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 393 = freebsd32_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 394 = mac_syscall */ - { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = getfsstat */ - { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = statfs */ - { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 397 = fstatfs */ - { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = fhstatfs */ + { AS(o2getfsstat_args), (sy_call_t *)sys_o2getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 395 = o2getfsstat */ + { AS(o2statfs_args), (sy_call_t *)sys_o2statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 396 = o2statfs */ + { AS(o2fstatfs_args), (sy_call_t *)sys_o2fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 397 = o2fstatfs */ + { AS(o2fhstatfs_args), (sy_call_t *)sys_o2fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 398 = o2fhstatfs */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 399 = nosys */ { AS(ksem_close_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 400 = ksem_close */ { AS(ksem_post_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 401 = ksem_post */ @@ -592,12 +592,16 @@ { AS(rctl_remove_rule_args), (sy_call_t *)sys_rctl_remove_rule, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 529 = rctl_remove_rule */ { AS(freebsd32_posix_fallocate_args), (sy_call_t *)freebsd32_posix_fallocate, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 530 = freebsd32_posix_fallocate */ { AS(freebsd32_posix_fadvise_args), (sy_call_t *)freebsd32_posix_fadvise, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 531 = freebsd32_posix_fadvise */ - { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = freebsd32_wait6 */ - { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = cap_rights_limit */ - { AS(cap_ioctls_limit_args), (sy_call_t *)sys_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = cap_ioctls_limit */ - { AS(cap_ioctls_get_args), (sy_call_t *)sys_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = cap_ioctls_get */ - { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = cap_fcntls_limit */ - { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 537 = cap_fcntls_get */ - { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 538 = bindat */ - { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 539 = connectat */ + { AS(getfsstat_args), (sy_call_t *)sys_getfsstat, AUE_GETFSSTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 532 = getfsstat */ + { AS(statfs_args), (sy_call_t *)sys_statfs, AUE_STATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 533 = statfs */ + { AS(fstatfs_args), (sy_call_t *)sys_fstatfs, AUE_FSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 534 = fstatfs */ + { AS(fhstatfs_args), (sy_call_t *)sys_fhstatfs, AUE_FHSTATFS, NULL, 0, 0, 0, SY_THR_STATIC }, /* 535 = fhstatfs */ + { AS(freebsd32_wait6_args), (sy_call_t *)freebsd32_wait6, AUE_WAIT6, NULL, 0, 0, 0, SY_THR_STATIC }, /* 536 = freebsd32_wait6 */ + { AS(cap_rights_limit_args), (sy_call_t *)sys_cap_rights_limit, AUE_CAP_RIGHTS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 537 = cap_rights_limit */ + { AS(cap_ioctls_limit_args), (sy_call_t *)sys_cap_ioctls_limit, AUE_CAP_IOCTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 538 = cap_ioctls_limit */ + { AS(cap_ioctls_get_args), (sy_call_t *)sys_cap_ioctls_get, AUE_CAP_IOCTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 539 = cap_ioctls_get */ + { AS(cap_fcntls_limit_args), (sy_call_t *)sys_cap_fcntls_limit, AUE_CAP_FCNTLS_LIMIT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 540 = cap_fcntls_limit */ + { AS(cap_fcntls_get_args), (sy_call_t *)sys_cap_fcntls_get, AUE_CAP_FCNTLS_GET, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = cap_fcntls_get */ + { AS(bindat_args), (sy_call_t *)sys_bindat, AUE_BINDAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = bindat */ + { AS(connectat_args), (sy_call_t *)sys_connectat, AUE_CONNECTAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 543 = connectat */ }; Index: compat/freebsd32/freebsd32_misc.c =================================================================== --- compat/freebsd32/freebsd32_misc.c (revision 247917) +++ compat/freebsd32/freebsd32_misc.c (working copy) @@ -258,7 +258,7 @@ count = uap->bufsize / sizeof(struct statfs32); size = count * sizeof(struct statfs); - error = kern_getfsstat(td, &buf, size, UIO_SYSSPACE, uap->flags); + error = kern_ngetfsstat(td, &buf, size, UIO_SYSSPACE, uap->flags); if (size > 0) { count = td->td_retval[0]; sp = buf; Index: compat/freebsd32/freebsd32_syscalls.c =================================================================== --- compat/freebsd32/freebsd32_syscalls.c (revision 247917) +++ compat/freebsd32/freebsd32_syscalls.c (working copy) @@ -405,10 +405,10 @@ "uuidgen", /* 392 = uuidgen */ "freebsd32_sendfile", /* 393 = freebsd32_sendfile */ "#394", /* 394 = mac_syscall */ - "getfsstat", /* 395 = getfsstat */ - "statfs", /* 396 = statfs */ - "fstatfs", /* 397 = fstatfs */ - "fhstatfs", /* 398 = fhstatfs */ + "o2getfsstat", /* 395 = o2getfsstat */ + "o2statfs", /* 396 = o2statfs */ + "o2fstatfs", /* 397 = o2fstatfs */ + "o2fhstatfs", /* 398 = o2fhstatfs */ "#399", /* 399 = nosys */ "ksem_close", /* 400 = ksem_close */ "ksem_post", /* 401 = ksem_post */ @@ -555,12 +555,16 @@ "rctl_remove_rule", /* 529 = rctl_remove_rule */ "freebsd32_posix_fallocate", /* 530 = freebsd32_posix_fallocate */ "freebsd32_posix_fadvise", /* 531 = freebsd32_posix_fadvise */ - "freebsd32_wait6", /* 532 = freebsd32_wait6 */ - "cap_rights_limit", /* 533 = cap_rights_limit */ - "cap_ioctls_limit", /* 534 = cap_ioctls_limit */ - "cap_ioctls_get", /* 535 = cap_ioctls_get */ - "cap_fcntls_limit", /* 536 = cap_fcntls_limit */ - "cap_fcntls_get", /* 537 = cap_fcntls_get */ - "bindat", /* 538 = bindat */ - "connectat", /* 539 = connectat */ + "getfsstat", /* 532 = getfsstat */ + "statfs", /* 533 = statfs */ + "fstatfs", /* 534 = fstatfs */ + "fhstatfs", /* 535 = fhstatfs */ + "freebsd32_wait6", /* 536 = freebsd32_wait6 */ + "cap_rights_limit", /* 537 = cap_rights_limit */ + "cap_ioctls_limit", /* 538 = cap_ioctls_limit */ + "cap_ioctls_get", /* 539 = cap_ioctls_get */ + "cap_fcntls_limit", /* 540 = cap_fcntls_limit */ + "cap_fcntls_get", /* 541 = cap_fcntls_get */ + "bindat", /* 542 = bindat */ + "connectat", /* 543 = connectat */ }; Index: sys/syscall.h =================================================================== --- sys/syscall.h (revision 247917) +++ sys/syscall.h (working copy) @@ -324,10 +324,10 @@ #define SYS_uuidgen 392 #define SYS_sendfile 393 #define SYS_mac_syscall 394 -#define SYS_getfsstat 395 -#define SYS_statfs 396 -#define SYS_fstatfs 397 -#define SYS_fhstatfs 398 +#define SYS_o2getfsstat 395 +#define SYS_o2statfs 396 +#define SYS_o2fstatfs 397 +#define SYS_o2fhstatfs 398 #define SYS_ksem_close 400 #define SYS_ksem_post 401 #define SYS_ksem_wait 402 @@ -451,12 +451,16 @@ #define SYS_rctl_remove_rule 529 #define SYS_posix_fallocate 530 #define SYS_posix_fadvise 531 -#define SYS_wait6 532 -#define SYS_cap_rights_limit 533 -#define SYS_cap_ioctls_limit 534 -#define SYS_cap_ioctls_get 535 -#define SYS_cap_fcntls_limit 536 -#define SYS_cap_fcntls_get 537 -#define SYS_bindat 538 -#define SYS_connectat 539 -#define SYS_MAXSYSCALL 540 +#define SYS_getfsstat 532 +#define SYS_statfs 533 +#define SYS_fstatfs 534 +#define SYS_fhstatfs 535 +#define SYS_wait6 536 +#define SYS_cap_rights_limit 537 +#define SYS_cap_ioctls_limit 538 +#define SYS_cap_ioctls_get 539 +#define SYS_cap_fcntls_limit 540 +#define SYS_cap_fcntls_get 541 +#define SYS_bindat 542 +#define SYS_connectat 543 +#define SYS_MAXSYSCALL 544 Index: sys/mount.h =================================================================== --- sys/mount.h (revision 247917) +++ sys/mount.h (working copy) @@ -64,7 +64,7 @@ * filesystem statistics */ #define MFSNAMELEN 16 /* length of type name including null */ -#define MNAMELEN 88 /* size of on/from name bufs */ +#define MNAMELEN MAXPATHLEN /* size of on/from name bufs */ #define STATFS_VERSION 0x20030518 /* current version number */ struct statfs { uint32_t f_version; /* structure version number */ @@ -92,6 +92,37 @@ }; #ifdef _KERNEL +/* + * filesystem statistics + */ +#define O2MFSNAMELEN 16 /* length of type name including null */ +#define O2MNAMELEN 88 /* size of on/from name bufs */ +#define O2STATFS_VERSION 0x20030518 /* current version number */ +struct o2statfs { + uint32_t f_version; /* structure version number */ + uint32_t f_type; /* type of filesystem */ + uint64_t f_flags; /* copy of mount exported flags */ + uint64_t f_bsize; /* filesystem fragment size */ + uint64_t f_iosize; /* optimal transfer block size */ + uint64_t f_blocks; /* total data blocks in filesystem */ + uint64_t f_bfree; /* free blocks in filesystem */ + int64_t f_bavail; /* free blocks avail to non-superuser */ + uint64_t f_files; /* total file nodes in filesystem */ + int64_t f_ffree; /* free nodes avail to non-superuser */ + uint64_t f_syncwrites; /* count of sync writes since mount */ + uint64_t f_asyncwrites; /* count of async writes since mount */ + uint64_t f_syncreads; /* count of sync reads since mount */ + uint64_t f_asyncreads; /* count of async reads since mount */ + uint64_t f_spare[10]; /* unused spare */ + uint32_t f_namemax; /* maximum filename length */ + uid_t f_owner; /* user that mounted the filesystem */ + fsid_t f_fsid; /* filesystem id */ + char f_charspare[80]; /* spare string space */ + char f_fstypename[O2MFSNAMELEN]; /* filesystem type name */ + char f_mntfromname[O2MNAMELEN]; /* mounted filesystem */ + char f_mntonname[O2MNAMELEN]; /* directory on which mounted */ +}; + #define OMFSNAMELEN 16 /* length of fs type name, including null */ #define OMNAMELEN (88 - 2 * sizeof(long)) /* size of on/from name bufs */ Index: sys/sysproto.h =================================================================== --- sys/sysproto.h (revision 247917) +++ sys/sysproto.h (working copy) @@ -1154,22 +1154,22 @@ char call_l_[PADL_(int)]; int call; char call_r_[PADR_(int)]; char arg_l_[PADL_(void *)]; void * arg; char arg_r_[PADR_(void *)]; }; -struct getfsstat_args { - char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; +struct o2getfsstat_args { + char buf_l_[PADL_(struct o2statfs *)]; struct o2statfs * buf; char buf_r_[PADR_(struct o2statfs *)]; char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; }; -struct statfs_args { +struct o2statfs_args { char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; - char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; + char buf_l_[PADL_(struct o2statfs *)]; struct o2statfs * buf; char buf_r_[PADR_(struct o2statfs *)]; }; -struct fstatfs_args { +struct o2fstatfs_args { char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; - char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; + char buf_l_[PADL_(struct o2statfs *)]; struct o2statfs * buf; char buf_r_[PADR_(struct o2statfs *)]; }; -struct fhstatfs_args { +struct o2fhstatfs_args { char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; - char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; + char buf_l_[PADL_(struct o2statfs *)]; struct o2statfs * buf; char buf_r_[PADR_(struct o2statfs *)]; }; struct ksem_close_args { char id_l_[PADL_(semid_t)]; semid_t id; char id_r_[PADR_(semid_t)]; @@ -1754,6 +1754,23 @@ char len_l_[PADL_(off_t)]; off_t len; char len_r_[PADR_(off_t)]; char advice_l_[PADL_(int)]; int advice; char advice_r_[PADR_(int)]; }; +struct getfsstat_args { + char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; + char bufsize_l_[PADL_(long)]; long bufsize; char bufsize_r_[PADR_(long)]; + char flags_l_[PADL_(int)]; int flags; char flags_r_[PADR_(int)]; +}; +struct statfs_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; +}; +struct fstatfs_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; +}; +struct fhstatfs_args { + char u_fhp_l_[PADL_(const struct fhandle *)]; const struct fhandle * u_fhp; char u_fhp_r_[PADR_(const struct fhandle *)]; + char buf_l_[PADL_(struct statfs *)]; struct statfs * buf; char buf_r_[PADR_(struct statfs *)]; +}; struct wait6_args { char idtype_l_[PADL_(int)]; int idtype; char idtype_r_[PADR_(int)]; char id_l_[PADL_(int)]; int id; char id_r_[PADR_(int)]; @@ -2050,10 +2067,10 @@ int sys_uuidgen(struct thread *, struct uuidgen_args *); int sys_sendfile(struct thread *, struct sendfile_args *); int sys_mac_syscall(struct thread *, struct mac_syscall_args *); -int sys_getfsstat(struct thread *, struct getfsstat_args *); -int sys_statfs(struct thread *, struct statfs_args *); -int sys_fstatfs(struct thread *, struct fstatfs_args *); -int sys_fhstatfs(struct thread *, struct fhstatfs_args *); +int sys_o2getfsstat(struct thread *, struct o2getfsstat_args *); +int sys_o2statfs(struct thread *, struct o2statfs_args *); +int sys_o2fstatfs(struct thread *, struct o2fstatfs_args *); +int sys_o2fhstatfs(struct thread *, struct o2fhstatfs_args *); int sys_ksem_close(struct thread *, struct ksem_close_args *); int sys_ksem_post(struct thread *, struct ksem_post_args *); int sys_ksem_wait(struct thread *, struct ksem_wait_args *); @@ -2177,6 +2194,10 @@ int sys_rctl_remove_rule(struct thread *, struct rctl_remove_rule_args *); int sys_posix_fallocate(struct thread *, struct posix_fallocate_args *); int sys_posix_fadvise(struct thread *, struct posix_fadvise_args *); +int sys_getfsstat(struct thread *, struct getfsstat_args *); +int sys_statfs(struct thread *, struct statfs_args *); +int sys_fstatfs(struct thread *, struct fstatfs_args *); +int sys_fhstatfs(struct thread *, struct fhstatfs_args *); int sys_wait6(struct thread *, struct wait6_args *); int sys_cap_rights_limit(struct thread *, struct cap_rights_limit_args *); int sys_cap_ioctls_limit(struct thread *, struct cap_ioctls_limit_args *); @@ -2753,10 +2774,10 @@ #define SYS_AUE_uuidgen AUE_NULL #define SYS_AUE_sendfile AUE_SENDFILE #define SYS_AUE_mac_syscall AUE_NULL -#define SYS_AUE_getfsstat AUE_GETFSSTAT -#define SYS_AUE_statfs AUE_STATFS -#define SYS_AUE_fstatfs AUE_FSTATFS -#define SYS_AUE_fhstatfs AUE_FHSTATFS +#define SYS_AUE_o2getfsstat AUE_GETFSSTAT +#define SYS_AUE_o2statfs AUE_STATFS +#define SYS_AUE_o2fstatfs AUE_FSTATFS +#define SYS_AUE_o2fhstatfs AUE_FHSTATFS #define SYS_AUE_ksem_close AUE_NULL #define SYS_AUE_ksem_post AUE_NULL #define SYS_AUE_ksem_wait AUE_NULL @@ -2880,6 +2901,10 @@ #define SYS_AUE_rctl_remove_rule AUE_NULL #define SYS_AUE_posix_fallocate AUE_NULL #define SYS_AUE_posix_fadvise AUE_NULL +#define SYS_AUE_getfsstat AUE_GETFSSTAT +#define SYS_AUE_statfs AUE_STATFS +#define SYS_AUE_fstatfs AUE_FSTATFS +#define SYS_AUE_fhstatfs AUE_FHSTATFS #define SYS_AUE_wait6 AUE_WAIT6 #define SYS_AUE_cap_rights_limit AUE_CAP_RIGHTS_LIMIT #define SYS_AUE_cap_ioctls_limit AUE_CAP_IOCTLS_LIMIT Index: sys/syscallsubr.h =================================================================== --- sys/syscallsubr.h (revision 247917) +++ sys/syscallsubr.h (working copy) @@ -100,8 +100,10 @@ enum uio_seg tptrseg); int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, long *basep, ssize_t *residp, enum uio_seg bufseg); -int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, +int kern_getfsstat(struct thread *td, struct o2statfs **buf, size_t bufsize, enum uio_seg bufseg, int flags); +int kern_ngetfsstat(struct thread *td, struct statfs **buf, size_t bufsize, + enum uio_seg bufseg, int flags); int kern_getgroups(struct thread *td, u_int *ngrp, gid_t *groups); int kern_getitimer(struct thread *, u_int, struct itimerval *); int kern_getpeername(struct thread *td, int fd, struct sockaddr **sa, Index: sys/syscall.mk =================================================================== --- sys/syscall.mk (revision 247917) +++ sys/syscall.mk (working copy) @@ -273,10 +273,10 @@ uuidgen.o \ sendfile.o \ mac_syscall.o \ - getfsstat.o \ - statfs.o \ - fstatfs.o \ - fhstatfs.o \ + o2getfsstat.o \ + o2statfs.o \ + o2fstatfs.o \ + o2fhstatfs.o \ ksem_close.o \ ksem_post.o \ ksem_wait.o \ @@ -400,6 +400,10 @@ rctl_remove_rule.o \ posix_fallocate.o \ posix_fadvise.o \ + getfsstat.o \ + statfs.o \ + fstatfs.o \ + fhstatfs.o \ wait6.o \ cap_rights_limit.o \ cap_ioctls_limit.o \