aboutsummaryrefslogtreecommitdiff
path: root/cddl/usr.sbin
diff options
context:
space:
mode:
authorDevin Teske <dteske@FreeBSD.org>2018-05-27 22:27:47 +0000
committerDevin Teske <dteske@FreeBSD.org>2018-05-27 22:27:47 +0000
commite08e9e999091f86081377b7cedc3fd2fe2ab70fc (patch)
tree631819df81f3d9af7ae7e9bd2637445bba5d0e88 /cddl/usr.sbin
parent877c96bedc216e37b47b709af0581b08aba208f4 (diff)
downloadsrc-e08e9e999091f86081377b7cedc3fd2fe2ab70fc.tar.gz
src-e08e9e999091f86081377b7cedc3fd2fe2ab70fc.zip
dwatch(1): Guard against error when given -t "*..."
dwatch allows you to customnize the predicate (condition) for when information is displayed. The DTrace syntax for this is: probe[, ...] /predicate/ { [actions] } But if predicate is something like "*args[1]!=NULL" to test that the first pointer in an array is non-NULL, the syntax produced is: probe[, ...] /*arg1!=NULL/ { [actions] } The issue being that "/*" is the beginning of a comment and thus the following error is emitted: dtrace: failed to compile script /dev/stdin: line 535: /* encountered inside a comment This patch adds whitespace around the argument given to -t, producing: probe[, ...] / *arg1!=NULL / { [actions] } Sponsored by: Smule, Inc.
Notes
Notes: svn path=/head/; revision=334261
Diffstat (limited to 'cddl/usr.sbin')
-rwxr-xr-xcddl/usr.sbin/dwatch/dwatch4
1 files changed, 2 insertions, 2 deletions
diff --git a/cddl/usr.sbin/dwatch/dwatch b/cddl/usr.sbin/dwatch/dwatch
index 05fe5921993f..2cb8a5517b05 100755
--- a/cddl/usr.sbin/dwatch/dwatch
+++ b/cddl/usr.sbin/dwatch/dwatch
@@ -47,7 +47,7 @@ DTRACE_PRAGMA="
############################################################ GLOBALS
-VERSION='$Version: 1.2 $' # -V
+VERSION='$Version: 1.3 $' # -V
pgm="${0##*/}" # Program basename
@@ -1353,7 +1353,7 @@ $ACTIONS
}
/*********************************************************/
-$PROBE${EVENT_TEST:+ /$EVENT_TEST/} /* probe ID $ID */
+$PROBE${EVENT_TEST:+ / $EVENT_TEST /} /* probe ID $ID */
{${TRACE:+
printf("<$ID>");
}