Re: [PATCH 1/7] cpu_conf: Introduce virCPUDefList{Parse, Free}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
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

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux