[libvirt] [PATCH v2 15/21] conf: Extract code for parsing thread resource scheduler info

Ján Tomko jtomko at redhat.com
Tue Feb 2 16:11:19 UTC 2016


On Fri, Jan 29, 2016 at 05:02:10PM +0100, Peter Krempa wrote:
> As the scheduler info elements are represented orthogonally to how it
> makes sense to actually store the information, the extracted code will
> be later used when converting between XML and internal definitions.
> ---
> 
> Notes:
>     v2: tweaked spelling in error message
> 
>  src/conf/domain_conf.c | 69 ++++++++++++++++++++++++++++++++------------------
>  1 file changed, 45 insertions(+), 24 deletions(-)
> 

ACK

> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -14522,36 +14522,34 @@ virDomainLoaderDefParseXML(xmlNodePtr node,
> +static virBitmapPtr
> +virDomainSchedulerParse(xmlNodePtr node,
> +                        const char *name,
> +                        virProcessSchedPolicy *policy,
> +                        int *priority)
>  {
> +    virBitmapPtr ret = NULL;
>      char *tmp = NULL;
>      int pol = 0;
> 
> -    tmp = virXMLPropString(node, name);
> -    if (!tmp) {
> +    if (!(tmp = virXMLPropString(node, name))) {
>          virReportError(VIR_ERR_XML_ERROR,
>                         _("Missing attribute '%s' in element '%sched'"),

This message could also use an extra 's'.

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/20160202/3b4a8021/attachment-0001.sig>


More information about the libvir-list mailing list