Add VNASSERT() which is just like KASSERT() but takes a vnode argument
which it will vn_printf() if it triggers.
This commit is contained in:
parent
0e1a43a2c6
commit
002c1cefd3
@ -74,8 +74,15 @@ extern int maxusers; /* system tune hint */
|
||||
if (__predict_false(!(exp))) \
|
||||
panic msg; \
|
||||
} while (0)
|
||||
#define VNASSERT(exp, vp, msg) do { \
|
||||
if (__predict_false(!(exp))) { \
|
||||
vn_printf(vp, "VNASSERT failed\n"); \
|
||||
panic msg; \
|
||||
} \
|
||||
} while (0)
|
||||
#else
|
||||
#define KASSERT(exp,msg)
|
||||
#define VNASSERT(exp, vp, msg)
|
||||
#endif
|
||||
|
||||
#ifndef CTASSERT /* Allow lint to override */
|
||||
|
Loading…
Reference in New Issue
Block a user