[Libguestfs] [PATCH] Don't include control characters in BufferIn trace output

Matthew Booth mbooth at redhat.com
Tue Oct 26 11:02:44 UTC 2010


Certain API calls, pwrite-device is an example, take a BufferIn as an argument
which may contain arbitrary binary data. If trace output is on, we will attempt
to print this to the terminal. As well as not working properly due to embedded
NUL characters, this can cause problems on the output terminal, is unlikely to
be useful, and can't be entered into guestfish in any case.

This patch scans BufferIn arguments if trace output is on. If it finds any
control characters it will replace the entire string with '<data>' in the trace
output.
---
 generator/generator_c.ml |   23 +++++++++++++++++++++--
 1 files changed, 21 insertions(+), 2 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Don-t-include-control-characters-in-BufferIn-trace-o.patch
Type: text/x-patch
Size: 1908 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20101026/6d401ccf/attachment.bin>


More information about the Libguestfs mailing list