Add a couple of KASSERTS to try to diagnose a problem reported.

This commit is contained in:
Poul-Henning Kamp 2004-12-20 21:12:11 +00:00
parent f1e27f62c1
commit 2c0220129d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=139083

View file

@ -395,8 +395,12 @@ devfs_getattr(ap)
struct cdev *dev;
de = vp->v_data;
if (vp->v_type == VDIR)
KASSERT(de != NULL, ("Null dirent in devfs_getattr vp=%p", vp));
if (vp->v_type == VDIR) {
de = de->de_dir;
KASSERT(de != NULL,
("Null dir dirent in devfs_getattr vp=%p", vp));
}
bzero((caddr_t) vap, sizeof(*vap));
vattr_null(vap);
vap->va_uid = de->de_uid;