[libvirt] [PATCH 08/23] qemu_conf: split out virQEMUDriverConfigLoadGlusterDebugEntry

John Ferlan jferlan at redhat.com
Thu Jan 17 13:22:15 UTC 2019



On 1/15/19 8:23 AM, Ján Tomko wrote:
> Split out parts of the config parsing code to make
> the parent function easier to read.
> 
> Signed-off-by: Ján Tomko <jtomko at redhat.com>
> ---
>  src/qemu/qemu_conf.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 135cb9e25d..ca31a222e8 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -423,6 +423,15 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
>  }
>  
>  
> +static int
> +virQEMUDriverConfigLoadGlusterDebugEntry(virQEMUDriverConfigPtr cfg,
> +                                         virConfPtr conf)
> +{
> +    if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0)
> +        return -1;
> +    return 0;

    return virConfGetValueUInt(...)


> +}
> +

blank line

Reviewed-by: John Ferlan <jferlan at redhat.com>

John

>  static int
>  virQEMUDriverConfigLoadSecurityEntry(virQEMUDriverConfigPtr cfg,
>                                       virConfPtr conf,
> @@ -914,7 +923,8 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
>                  goto cleanup;
>          }
>      }
> -    if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0)
> +
> +    if (virQEMUDriverConfigLoadGlusterDebugEntry(cfg, conf) < 0)
>          goto cleanup;
>  
>      if (virQEMUDriverConfigLoadSecurityEntry(cfg, conf, privileged) < 0)
> 




More information about the libvir-list mailing list