]> xenbits.xensource.com Git - xen.git/commit
libxl: ao: Convert libxl_run_bootloader
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 May 2012 17:59:00 +0000 (18:59 +0100)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 11 May 2012 17:59:00 +0000 (18:59 +0100)
commit599c7844af1ffe83ce79b94a02515208256d20af
tree545478a544848b38809b76b268da0df6b4a6100b
parent4572b1f8becaf7686125648398379d75a18c478a
libxl: ao: Convert libxl_run_bootloader

Convert libxl_run_bootloader to an ao_how-taking function.

It's implemented in terms of libxl__bootloader_run, which can be used
internally.  The resulting code is pretty much a rewrite.

Significant changes include:

- We direct the bootloader's results to a file, not a pipe.  This
  makes it simpler to deal with as we don't have to read it
  concurrently along with everything else.

- We now issue a warning if we find unexpected statements in the
  bootloader results.

- The arrangements for buffering of bootloader input and output
  are completely changed.  Now we have a fixed limit of 64k
  on output, and 4k on input, and discard the oldest data when
  this overflows (which it shouldn't).  There is no timeout
  any more.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Changes since v6:
 * Use libxl__ev_child_inuse rather than testing pid directly.
 * Fix a code style error.
 * Properly initialise the sub-operations' aos in _init.
 * Bugfixes.
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
tools/libxl/libxl.c
tools/libxl/libxl.h
tools/libxl/libxl_bootloader.c
tools/libxl/libxl_create.c
tools/libxl/libxl_internal.h