diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2023-10-12 15:16:45 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2023-10-12 15:16:45 +0000 |
commit | f50bfdb6ce3bae6323107fc1f01b99bb2247f430 (patch) | |
tree | 34dd974ed08e3db484b98f77333f0e7c751a0855 /usr.sbin/btrace/btrace.c | |
parent | 4e3f4aba3cbd7eaf680b291ee1c8cf32244e7949 (diff) |
bt(5), btrace(8): add support for binary modulo operator ('%')
Link: https://marc.info/?l=openbsd-tech&m=169695435209410&w=2
ok mpi@
Diffstat (limited to 'usr.sbin/btrace/btrace.c')
-rw-r--r-- | usr.sbin/btrace/btrace.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/btrace/btrace.c b/usr.sbin/btrace/btrace.c index 8feb0ef3250..847fa2f652a 100644 --- a/usr.sbin/btrace/btrace.c +++ b/usr.sbin/btrace/btrace.c @@ -1,4 +1,4 @@ -/* $OpenBSD: btrace.c,v 1.78 2023/09/15 10:59:02 claudio Exp $ */ +/* $OpenBSD: btrace.c,v 1.79 2023/10/12 15:16:44 cheloha Exp $ */ /* * Copyright (c) 2019 - 2023 Martin Pieuchot <mpi@openbsd.org> @@ -1416,6 +1416,9 @@ baexpr2long(struct bt_arg *ba, struct dt_evt *dtev) case B_AT_OP_DIVIDE: result = lval / rval; break; + case B_AT_OP_MODULO: + result = lval % rval; + break; case B_AT_OP_BAND: result = lval & rval; break; @@ -1526,6 +1529,8 @@ ba_name(struct bt_arg *ba) return "*"; case B_AT_OP_DIVIDE: return "/"; + case B_AT_OP_MODULO: + return "%"; case B_AT_OP_BAND: return "&"; case B_AT_OP_XOR: |