On Tue, May 22, 2012 at 08:35:48AM -0700, Matthew Dempsky wrote: > Are you missing the header bits for linux_statfs64? I don't see where > it's defined.
Yup, missed the file in the diff. Thanks for spoting that. > > > + /* > > + * Convert BSD filesystem names to Linux filesystem type numbers > > + * where possible. Linux statfs uses a value of -1 to indicate > > + * an unsupported field. > > + */ > > + if (!strcmp(bsp->f_fstypename, MOUNT_FFS) || > > + !strcmp(bsp->f_fstypename, MOUNT_MFS)) > > + lsp->l_ftype = 0x11954; > > + else if (!strcmp(bsp->f_fstypename, MOUNT_NFS)) > > + lsp->l_ftype = 0x6969; > > + else if (!strcmp(bsp->f_fstypename, MOUNT_MSDOS)) > > + lsp->l_ftype = 0x4d44; > > + else if (!strcmp(bsp->f_fstypename, MOUNT_PROCFS)) > > + lsp->l_ftype = 0x9fa0; > > + else if (!strcmp(bsp->f_fstypename, MOUNT_EXT2FS)) > > + lsp->l_ftype = 0xef53; > > + else if (!strcmp(bsp->f_fstypename, MOUNT_CD9660)) > > + lsp->l_ftype = 0x9660; > > + else if (!strcmp(bsp->f_fstypename, MOUNT_NCPFS)) > > + lsp->l_ftype = 0x6969; > > + else > > + lsp->l_ftype = -1; > > Can this code go into a separate function so we don't have to > duplicate it for both statfs and statfs64? I thought about it. Best would be a macro, but I hate C macro's. > > +int > > +linux_sys_statfs64(struct proc *p, void *v, register_t *retval) > > +{ > > + struct linux_sys_statfs64_args /* { > > + syscallarg(char *) path; > > + syscallarg(struct linux_statfs *) sp; > > + } */ *uap = v; > > The comment is wrong: sp should be linux_statfs64. Copy-paste error, thanks. > > > -268 UNIMPL linux_sys_statfs64 > > +268 STD { int linux_sys_statfs64(char *path, \ > > + struct linux_statfs64 *sp); } > > 269 UNIMPL linux_sys_fstatfs64 > > It looks like linux_sys_fstatfs64 should be easy to implement too now > if you wanted to do that in this diff as well. Yup, I have that in a separate diff.