print the tag symbolically if we don't support it.
This commit is contained in:
parent
a3a1845d5b
commit
dade5d6c98
@ -1,4 +1,4 @@
|
|||||||
/* $NetBSD: fstat.c,v 1.109 2015/03/08 06:46:51 mlelstv Exp $ */
|
/* $NetBSD: fstat.c,v 1.110 2015/12/22 23:35:21 christos Exp $ */
|
||||||
|
|
||||||
/*-
|
/*-
|
||||||
* Copyright (c) 1988, 1993
|
* Copyright (c) 1988, 1993
|
||||||
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 1993\
|
|||||||
#if 0
|
#if 0
|
||||||
static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95";
|
static char sccsid[] = "@(#)fstat.c 8.3 (Berkeley) 5/2/95";
|
||||||
#else
|
#else
|
||||||
__RCSID("$NetBSD: fstat.c,v 1.109 2015/03/08 06:46:51 mlelstv Exp $");
|
__RCSID("$NetBSD: fstat.c,v 1.110 2015/12/22 23:35:21 christos Exp $");
|
||||||
#endif
|
#endif
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
@ -532,6 +532,9 @@ ftrans(fdfile_t *fp, int i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static const char dead[] = "dead";
|
static const char dead[] = "dead";
|
||||||
|
static const char *vnode_tag[] = {
|
||||||
|
VNODE_TAGS
|
||||||
|
};
|
||||||
|
|
||||||
static const char *
|
static const char *
|
||||||
vfilestat(struct vnode *vp, struct filestat *fsp)
|
vfilestat(struct vnode *vp, struct filestat *fsp)
|
||||||
@ -588,8 +591,9 @@ vfilestat(struct vnode *vp, struct filestat *fsp)
|
|||||||
break;
|
break;
|
||||||
default: {
|
default: {
|
||||||
static char unknown[10];
|
static char unknown[10];
|
||||||
(void)snprintf(unknown, sizeof unknown,
|
(void)snprintf(unknown, sizeof unknown, "%s(%#x)",
|
||||||
"?(%x)", vp->v_tag);
|
(size_t)vp->v_tag < __arraycount(vnode_tag) ?
|
||||||
|
vnode_tag[vp->v_tag] : "?", vp->v_tag);
|
||||||
badtype = unknown;
|
badtype = unknown;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user