diff options
author | Jiri Slaby <jslaby@suse.cz> | 2020-06-15 10:48:50 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-06-24 18:08:32 +0300 |
commit | 754bda9807f2fcc0fe32ebeaef9f6443b2151059 (patch) | |
tree | eecffd00a02ba5720d905a3e8d37151bf8bfef8c /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 917ae1a9907bf33fe41fdfe68c6fcb03dfa07ed2 (diff) | |
download | linux-754bda9807f2fcc0fe32ebeaef9f6443b2151059.tar.xz |
vc: extract detecting control characters from do_con_write
Move the control characters detection to a separate function dubbed
vc_is_control. It makes the 14 subexpressions a "bit" more readable. And
also simplifies next patches.
It moves also CTRL_ACTION and CTRL_ALWAYS to this new function, as they
are used exclusively here. While at it, these are converted to static
const variables.
And we use "& BIT()" instead of ">>" and "& 1".
Checked using symbolic execution (klee), that the old and new
behaviors are the same.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200615074910.19267-18-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions