Bug 731744

Summary: libguestfs should escape special/non-printing characters in debug output
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 731742 Environment:
Last Closed: 2011-08-18 21:32:11 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 719879, 731742    

Description Richard W.M. Jones 2011-08-18 14:27:12 UTC
+++ This bug was initially created as a clone of Bug #731742 +++

Description of problem:

In seabios-0.6.1.2-4.el6.x86_64 from RHEL 6.2 the BIOS prints
special control characters to clear the screen etc.  Some lame
attempt at a splash screen.

Unfortunately libguestfs in debug mode (LIBGUESTFS_DEBUG=1)
simply echos these characters straight to stderr, meaning that
you see the screen being cleared and so on.

libguestfs should strip or escape these special characters in
its default debug mode.

Also we should document this here:
http://libguestfs.org/guestfs.3.html#guestfs_event_callback

Version-Release number of selected component (if applicable):

libguestfs-1.7.17-26.el6.x86_64

How reproducible:

100%

Steps to Reproduce:
1. Install seabios-0.6.1.2-4.el6.x86_64 (RHEL 6)
2. Install qemu-kvm-0.12.1.2-2.183.el6.x86_64 (RHEL 6)
3. Run guestfish -a /dev/null run -v
  
Actual results:

Observe that early in the debug output the screen is cleared.

Expected results:

The control characters should be escaped.