--- src/sys/emulation/linux/linux_stats.c 2004/10/05 07:57:41 1.14 +++ src/sys/emulation/linux/linux_stats.c 2004/11/12 00:09:18 1.15 @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -234,9 +233,8 @@ statfs_copyout(struct statfs *statfs, st int linux_statfs(struct linux_statfs_args *args) { - struct thread *td = curthread; struct statfs statfs; - struct nameidata nd; + struct nlookupdata nd; char *path; int error; @@ -247,10 +245,10 @@ linux_statfs(struct linux_statfs_args *a if (ldebug(statfs)) printf(ARGS(statfs, "%s, *"), path); #endif - NDINIT(&nd, NAMEI_LOOKUP, CNP_FOLLOW, UIO_SYSSPACE, path, td); - - error = kern_statfs(&nd, &statfs); - + error = nlookup_init(&nd, path, UIO_SYSSPACE, NLC_FOLLOW); + if (error == 0) + error = kern_statfs(&nd, &statfs); + nlookup_done(&nd); if (error == 0) error = statfs_copyout(&statfs, args->buf); linux_free_path(&path);