[libvirt] [PATCH 1/7] cpu_conf: Introduce virCPUDefList{Parse, Free}
Ján Tomko
jtomko at redhat.com
Fri Sep 15 12:04:42 UTC 2017
On Thu, Sep 14, 2017 at 12:57:14PM +0200, Jiri Denemark wrote:
>For parsing a list of CPU XMLs into a NULL-terminated list of CPU defs.
>
>Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
>---
> src/conf/cpu_conf.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++
> src/conf/cpu_conf.h | 7 +++++
> src/libvirt_private.syms | 2 ++
> 3 files changed, 87 insertions(+)
>
[...]
>+/*
>+ * Parses a list of CPU XMLs into a NULL-terminated list of CPU defs.
>+ */
>+virCPUDefPtr *
>+virCPUDefListParse(const char **xmlCPUs,
>+ unsigned int ncpus,
>+ virCPUType cpuType)
>+{
>+
[...]
>+ if (ncpus < 1) {
Interesting way of spelling '== 0'
>+ virReportError(VIR_ERR_INVALID_ARG, "%s", _("no CPUs given"));
>+ goto error;
>+ }
>+
Jan
-------------- 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/20170915/50a8b2b9/attachment-0001.sig>
More information about the libvir-list
mailing list