diff options
author | phk <phk@FreeBSD.org> | 2004-12-03 12:15:39 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2004-12-03 12:15:39 +0000 |
commit | 410936c3f9c92347840df82d71941e914fda8936 (patch) | |
tree | c0f126667d6e9d360e21174e1abb90838d0bc036 /sys | |
parent | 4b1a11443659e50cf4dd8cb4be481621cde3db2c (diff) | |
download | FreeBSD-src-410936c3f9c92347840df82d71941e914fda8936.zip FreeBSD-src-410936c3f9c92347840df82d71941e914fda8936.tar.gz |
Make NAMEI_DIAGNOSTIC compile again and add a stragic vprint()
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_lookup.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/kern/vfs_lookup.c b/sys/kern/vfs_lookup.c index 1410754..acfe11f 100644 --- a/sys/kern/vfs_lookup.c +++ b/sys/kern/vfs_lookup.c @@ -57,6 +57,9 @@ __FBSDID("$FreeBSD$"); #include <vm/uma.h> +#define NAMEI_DIAGNOSTIC 1 +#undef NAMEI_DIAGNOSTIC + /* * Allocation zone for namei */ @@ -484,6 +487,9 @@ unionlookup: ndp->ni_vp = NULL; cnp->cn_flags &= ~PDIRUNLOCK; ASSERT_VOP_LOCKED(dp, "lookup"); +#ifdef NAMEI_DIAGNOSTIC + vprint("lookup in", dp); +#endif if ((error = VOP_LOOKUP(dp, &ndp->ni_vp, cnp)) != 0) { KASSERT(ndp->ni_vp == NULL, ("leaf should be empty")); #ifdef NAMEI_DIAGNOSTIC @@ -659,10 +665,6 @@ relookup(dvp, vpp, cnp) int wantparent; /* 1 => wantparent or lockparent flag */ int rdonly; /* lookup read-only flag bit */ int error = 0; -#ifdef NAMEI_DIAGNOSTIC - int newhash; /* DEBUG: check name hash */ - char *cp; /* DEBUG: check name ptr/len */ -#endif /* * Setup: break out flag bits into variables. @@ -687,10 +689,6 @@ relookup(dvp, vpp, cnp) * responsibility for freeing the pathname buffer. */ #ifdef NAMEI_DIAGNOSTIC - if (cnp->cn_namelen != cp - cnp->cn_nameptr) - panic ("relookup: bad len"); - if (*cp != 0) - panic("relookup: not last component"); printf("{%s}: ", cnp->cn_nameptr); #endif @@ -723,6 +721,9 @@ relookup(dvp, vpp, cnp) /* * We now have a segment name to search for, and a directory to search. */ +#ifdef NAMEI_DIAGNOSTIC + vprint("search in:", dp); +#endif if ((error = VOP_LOOKUP(dp, vpp, cnp)) != 0) { KASSERT(*vpp == NULL, ("leaf should be empty")); if (error != EJUSTRETURN) |