Add GUESTFS_EVENT_ENTER event. This event is generated whenever a libguestfs function is called.
Escape special/non-printing characters in debug output (RHBZ#731744). The default event handler in libguestfs was simply writing all debug output directly to stderr. However if the output contains non-printable characters such as terminal control codes then these would also be sent directly. With newer SeaBIOS there is a lame attempt to implement a splash screen using terminal control codes, thus when libguestfs tries to display debugging output it would cause the screen to clear and debug output to be lost. This commit causes all non-printing characters to be escaped. (\n and \r characters from the appliance are treated somewhat specially). Furthermore, instead of using write(2), use buffered stderr calls.
Avoid warning about implicit declaration of strlen. * src/events.c: Include <string.h>, for use of strlen.
New event API (RHBZ#664558). This API allows more than one callback to be registered for each event, makes it possible to call the API from other languages, and allows [nearly all] log, debug and trace messages to be rerouted from stderr. An older version of this API was discussed on the mailing list here: https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html This also updates guestfish to use the new API for its progress bars.