Index: sys/sys/systm.h =================================================================== --- sys/sys/systm.h +++ sys/sys/systm.h @@ -107,16 +107,24 @@ } while (0) #define VNASSERT(exp, vp, msg) do { \ if (__predict_false(!(exp))) { \ - vn_printf(vp, "VNASSERT failed\n"); \ + vn_printf(vp, "VNASSERT failed: %s not true at %s:%d (%s)\n",\ + #exp, __FILE__, __LINE__, __func__); \ kassert_panic msg; \ } \ } while (0) +#define VNPASS(exp, vp) do { \ + const char *_exp = #exp; \ + VNASSERT(exp, vp, ("condition %s not met at %s:%d (%s)", \ + _exp, __FILE__, __LINE__, __func__)); \ +} while (0) #else #define KASSERT(exp,msg) do { \ } while (0) #define VNASSERT(exp, vp, msg) do { \ } while (0) +#define VNPASS(exp, vp) do { \ +} while (0) #endif #ifndef CTASSERT /* Allow lint to override */