diff options
author | 2021-01-10 11:06:08 +0000 | |
---|---|---|
committer | 2021-01-10 11:06:08 +0000 | |
commit | 676820ed8544d921f13a44825623367ce220ca2c (patch) | |
tree | a68b975a8ec04d34202fdaecd07b8fa5a9c848b9 | |
parent | tweak a comment (diff) | |
download | wireguard-openbsd-676820ed8544d921f13a44825623367ce220ca2c.tar.xz wireguard-openbsd-676820ed8544d921f13a44825623367ce220ca2c.zip |
Exclude the 'hz' token from the lexer backdoor, so interval and profile
probes can be parsed again.
ok anton@ kn@
-rw-r--r-- | usr.sbin/btrace/bt_parse.y | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/btrace/bt_parse.y b/usr.sbin/btrace/bt_parse.y index 520b544040f..187db9f6d1d 100644 --- a/usr.sbin/btrace/bt_parse.y +++ b/usr.sbin/btrace/bt_parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: bt_parse.y,v 1.20 2020/12/11 07:27:55 anton Exp $ */ +/* $OpenBSD: bt_parse.y,v 1.21 2021/01/10 11:06:08 jmatthew Exp $ */ /* * Copyright (c) 2019 - 2020 Martin Pieuchot <mpi@openbsd.org> @@ -792,10 +792,14 @@ again: /* * Probe lexer backdoor, interpret the token as a string * rather than a keyword. Otherwise, reserved keywords - * would conflict with syscall names. + * would conflict with syscall names. The exception to + * this is 'hz', which hopefully will never be a + * syscall. */ - yylval.v.string = kwp->word; - return STRING; + if (kwp->token != HZ) { + yylval.v.string = kwp->word; + return STRING; + } } yylval.v.i = kwp->type; return kwp->token; |