summaryrefslogtreecommitdiffstats
path: root/src/events.c
Commit message (Collapse)AuthorAgeFilesLines
* Escape special/non-printing characters in debug output (RHBZ#731744).Richard W.M. Jones2011-09-161-12/+42
| | | | | | | | | | | | | | | | | | | 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. (cherry picked from commit 06019bc82e107f7715ebc59e491610e06dad1e39)
* Avoid warning about implicit declaration of strlen.Jim Meyering2011-04-181-0/+1
| | | | | * src/events.c: Include <string.h>, for use of strlen. (cherry picked from commit a53833fdd21cd573fe8fd02d7a11a3a5e9764ce0)
* New event API (RHBZ#664558).Richard W.M. Jones2011-03-151-0/+323
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.