summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fail.c
diff options
context:
space:
mode:
authormdf <mdf@FreeBSD.org>2010-12-21 18:23:03 +0000
committermdf <mdf@FreeBSD.org>2010-12-21 18:23:03 +0000
commit9e845cb332b444d14b9a83e4024b740496eaae9b (patch)
treec34d66bfb7ef8c5c052bddaeb3b7cb76d0f737d5 /sys/kern/kern_fail.c
parent1d6bcd735e5e47b7d2457f772337c97f5705b63e (diff)
downloadFreeBSD-src-9e845cb332b444d14b9a83e4024b740496eaae9b.zip
FreeBSD-src-9e845cb332b444d14b9a83e4024b740496eaae9b.tar.gz
Initialize fp_location for explicitly managed fail points, and push
the parentheses around the location for simple fail points into the location string. This makes the print on fail point set more consistent between the two versions. Also fix up fail.h a little for style(9): only use one of sys/param.h and sys/types.h, and use the existing __XSTRING() macro instead of rolling our own. Also fix up a few tabs on changed and nearby lines. Lastly, since KFAIL_POINT_{BEGIN,END} are not meant for use outside this file, just eliminate the macros entirely. MFC after: 1 week
Diffstat (limited to 'sys/kern/kern_fail.c')
-rw-r--r--sys/kern/kern_fail.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_fail.c b/sys/kern/kern_fail.c
index 965219e..e0fb32b 100644
--- a/sys/kern/kern_fail.c
+++ b/sys/kern/kern_fail.c
@@ -177,6 +177,7 @@ fail_point_init(struct fail_point *fp, const char *fmt, ...)
va_end(ap);
}
fp->fp_name = name;
+ fp->fp_location = "";
fp->fp_flags |= FAIL_POINT_DYNAMIC_NAME;
fp->fp_sleep_fn = NULL;
fp->fp_sleep_arg = NULL;
@@ -372,10 +373,10 @@ fail_point_set(struct fail_point *fp, char *buf)
end:
#ifdef IWARNING
if (error)
- IWARNING("Failed to set %s (%s) to %s",
+ IWARNING("Failed to set %s %s to %s",
fp->fp_name, fp->fp_location, buf);
else
- INOTICE("Set %s (%s) to %s",
+ INOTICE("Set %s %s to %s",
fp->fp_name, fp->fp_location, buf);
#endif /* IWARNING */
OpenPOWER on IntegriCloud