Aaand I'm reposting this series again, in the hope that this time
it will
consistently send to the mailing list. Again, very sorry for the noise.
Differences to v1:
- use gnulib's reentrant getopt implementation. This is necessary for thread
safety.
- config-post.h: __GNUC_PREREQ is defined here, since using gnulib's getopt
pulls in other gnulib headers, which rely on __GNUC_PREREQ, which doesn't
exist on FreeBSD.
This approach is open for discussion: I chose config-post.h as this would
likely always be the first header pulled in (through config.h).
Link to v1:
https://www.redhat.com/archives/libvir-list/2016-June/msg00001.html
Fabian Freyer (5):
config-post.h: define __GNUC_PREREQ if not defined
gnulib: add getopt module
bhyve: implement virConnectDomainXMLFromNative
bhyve: implement bhyve argument parser
bhyve: implement argument parser for loader
bootstrap.conf | 1 +
config-post.h | 11 +
m4/virt-driver-bhyve.m4 | 3 +
po/POTFILES.in | 1 +
src/Makefile.am | 2 +
src/bhyve/bhyve_driver.c | 42 ++
src/bhyve/bhyve_parse_command.c | 875 ++++++++++++++++++++++++++++++++++++++++
src/bhyve/bhyve_parse_command.h | 30 ++
8 files changed, 965 insertions(+)
create mode 100644 src/bhyve/bhyve_parse_command.c
create mode 100644 src/bhyve/bhyve_parse_command.h
Generally it's looking good and working. I've spotted some minor issues
while testing:
1. <domain type='none'> <-- this should be <domain
type='bhyve'>
2. By mistake, I gave it xml file for input instead of argv file and
it didn't fail but returned an empty XML file instead. I think it
should fail early, at least if it sees no "bhyve" command on the
input.
Roman Bogorodskiy