projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
tools lib traceevent: Add '~' operation within arg_num_eval()
[cascardo/linux.git]
/
tools
/
lib
/
traceevent
/
event-parse.c
diff --git
a/tools/lib/traceevent/event-parse.c
b/tools/lib/traceevent/event-parse.c
index
865dea5
..
190cc88
100644
(file)
--- a/
tools/lib/traceevent/event-parse.c
+++ b/
tools/lib/traceevent/event-parse.c
@@
-2398,6
+2398,12
@@
static int arg_num_eval(struct print_arg *arg, long long *val)
break;
*val = left + right;
break;
+ case '~':
+ ret = arg_num_eval(arg->op.right, &right);
+ if (!ret)
+ break;
+ *val = ~right;
+ break;
default:
do_warning("unknown op '%s'", arg->op.op);
ret = 0;