[libvirt] [PATCH 09/11] qemu: process: Extract pre-start checks into a function

Ján Tomko jtomko at redhat.com
Sat Feb 6 09:52:05 UTC 2016


On Thu, Feb 04, 2016 at 03:49:46PM +0100, Peter Krempa wrote:
> When starting a qemu process there are certain checks done to ensure
> that the configuration makes sense. Extract them into a separate
> function so that they can be reused in the test code.
> ---
>  src/qemu/qemu_migration.c |  2 +-
>  src/qemu/qemu_process.c   | 41 ++++++++++++++++++++++++++++++++---------
>  src/qemu/qemu_process.h   |  9 ++++++++-
>  3 files changed, 41 insertions(+), 11 deletions(-)
> 

> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index 0f617da..ea1e103 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -4401,6 +4401,32 @@ qemuProcessMakeDir(virQEMUDriverPtr driver,
> 
> 
>  /**
> + * qemuProcessStartValidate:
> + * @vm: domain object
> + * @qemuCaps: emulator capabilities
> + * @migration: restoration of eixting state

existing?

> + *
> + * This function agregates checks independent from host state done prior to

aggregates

> + * start of a VM.
> + */
> +int
> +qemuProcessStartValidate(virDomainDefPtr def,
> +                         virQEMUCapsPtr qemuCaps,
> +                         bool migration,
> +                         bool snapshot)
> +{
> +    if (qemuValidateCpuCount(def, qemuCaps) < 0)
> +        return -1;
> +

ACK

Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160206/3a60eea7/attachment-0001.sig>


More information about the libvir-list mailing list