Parse the -M (or -machine) command line option before starting
processing in earnest and have a fallback ready in case it's not
present, so that while parsing other options we can rely on
def->os.machine being initialized.
Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1379218
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
Changes from [v1]:
* rework command line parsing instead of adding checks to
qemuDomainMachineIs*() functions
[v1]
https://www.redhat.com/archives/libvir-list/2017-October/msg00406.html
src/qemu/qemu_parse_command.c | 174 ++++++++++++---------
.../qemuargv2xml-nomachine-aarch64.args | 11 ++
.../qemuargv2xml-nomachine-aarch64.xml | 39 +++++
.../qemuargv2xml-nomachine-ppc64.args | 11 ++
.../qemuargv2xml-nomachine-ppc64.xml | 49 ++++++
.../qemuargv2xml-nomachine-x86_64.args | 11 ++
.../qemuargv2xml-nomachine-x86_64.xml | 48 ++++++
tests/qemuargv2xmltest.c | 4 +
8 files changed, 270 insertions(+), 77 deletions(-)
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nomachine-aarch64.args
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nomachine-aarch64.xml
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nomachine-ppc64.args
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nomachine-ppc64.xml
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nomachine-x86_64.args
create mode 100644 tests/qemuargv2xmldata/qemuargv2xml-nomachine-x86_64.xml
Reviewed-by: Daniel P. Berrange <berrange(a)redhat.com>
Regards,
Daniel
--
|: