On Tue, Oct 10, 2017 at 06:01:17PM +0200, Andrea Bolognani wrote: > 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@xxxxxxxxxx> > --- > 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@xxxxxxxxxx> Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :| -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list