diff options
author | Daniel Thompson <[email protected]> | 2024-04-24 15:03:35 +0100 |
---|---|---|
committer | Daniel Thompson <[email protected]> | 2024-04-26 17:13:30 +0100 |
commit | 09b35989421dfd5573f0b4683c7700a7483c71f9 (patch) | |
tree | 344e717dcc4cb01bfbc8211f27061a60dc5526e2 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | e9730744bf3af04cda23799029342aa3cddbc454 (diff) |
kdb: Use format-strings rather than '\0' injection in kdb_read()
Currently when kdb_read() needs to reposition the cursor it uses copy and
paste code that works by injecting an '\0' at the cursor position before
delivering a carriage-return and reprinting the line (which stops at the
'\0').
Tidy up the code by hoisting the copy and paste code into an appropriately
named function. Additionally let's replace the '\0' injection with a
proper field width parameter so that the string will be abridged during
formatting instead.
Cc: [email protected] # Not a bug fix but it is needed for later bug fixes
Tested-by: Justin Stitt <[email protected]>
Reviewed-by: Douglas Anderson <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Daniel Thompson <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions