Remove guestfs___print_timestamped_argv.
authorRichard W.M. Jones <rjones@redhat.com>
Thu, 18 Aug 2011 16:41:09 +0000 (17:41 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Sun, 28 Aug 2011 08:15:25 +0000 (09:15 +0100)
commit87b9c32c2afb7ea8c46e44753f7560c9b7ba20f7
treef7a77720003cbe8286c9dcd1be8f1de030848675
parent49579aad6e493e5f87f70c32838fe0691dff2119
Remove guestfs___print_timestamped_argv.

This function was used to print the qemu and
febootstrap-supermin-helper command lines.

Unfortunately in the qemu case it was used incorrectly: it called the
internal debug function (ie. event API callback) from the forked qemu
subprocess, which meant that higher level event callbacks might have
been invoked from the child process.

To fix this, convert the qemu case into a new function called
print_qemu_command line which just prints the command line directly to
stderr.  This is called after stderr has been redirected into the pipe
to the main process.  Thus the qemu command line will be marshalled
into the event API along with other qemu and appliance output.

After fixing this, only one use of guestfs___print_timestamped_argv
remained, for printing the febootstrap-supermin-helper command line.
This is converted to a local function print_febootstrap_command_line.

Also print_febootstrap_command_line is now called before we fork
febootstrap-supermin-helper, so that messages no longer overlap.
(cherry picked from commit 635af5be04265f845186b40e9a9fe7b102ad6909)
src/appliance.c
src/guestfs-internal.h
src/launch.c