[libvirt] [PATCH 1/4] qemu: refactor qemuDomainMachineIs* and qemuDomainMachineNeedsFDC
Peter Krempa
pkrempa at redhat.com
Tue Apr 18 09:38:09 UTC 2017
On Thu, Apr 13, 2017 at 16:57:13 +0200, Pavel Hrdina wrote:
> These functions don't require the whole virDomainDef structure,
> they only need *machine* and *arch*.
>
> Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
> ---
> src/qemu/qemu_alias.c | 4 +--
> src/qemu/qemu_capabilities.c | 10 +++---
> src/qemu/qemu_command.c | 42 +++++++++++-----------
> src/qemu/qemu_domain.c | 79 ++++++++++++++++++++++--------------------
> src/qemu/qemu_domain.h | 14 ++++----
> src/qemu/qemu_domain_address.c | 16 ++++-----
> src/qemu/qemu_hotplug.c | 14 ++++----
> src/qemu/qemu_parse_command.c | 8 ++---
> 8 files changed, 95 insertions(+), 92 deletions(-)
In most cases where this is used you have the domain object so it's more
straightfowrward to extract it from that.
I'm suggesting that you modify qemuDomainMachineHasBuiltinIDE and
friends to be a wrapper which only extracts the os.machine object from
def and calls a new helper which will not take the domain (and not
contain the word "Domain"). That way you won't have to make all other
callers uglier.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170418/9abb3651/attachment-0001.sig>
More information about the libvir-list
mailing list