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

Re: [libvirt] [PATCH 21/23] qemu_conf: split out virQEMUDriverConfigLoadDefaultTLSEntry




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 redhat com>
> ---
>  src/qemu/qemu_conf.c | 28 ++++++++++++++++++++--------
>  1 file changed, 20 insertions(+), 8 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index 7eecb3ef91..0877a5b7c1 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -423,6 +423,24 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
>  }
>  
>  
> +static int
> +virQEMUDriverConfigLoadDefaultTLSEntry(virQEMUDriverConfigPtr cfg,
> +                                       virConfPtr conf)
> +{
> +    int rv;
> +
> +    if ((rv = virConfGetValueString(conf, "default_tls_x509_cert_dir", &cfg->defaultTLSx509certdir)) < 0)
> +        return -1;
> +    cfg->checkdefaultTLSx509certdir = (rv == 1);
> +    if (virConfGetValueBool(conf, "default_tls_x509_verify", &cfg->defaultTLSx509verify) < 0)
> +        return -1;
> +    if (virConfGetValueString(conf, "default_tls_x509_secret_uuid",
> +                              &cfg->defaultTLSx509secretUUID) < 0)
> +        return -1;
> +
> +    return 0;
> +}
> +

blank line

>  static int
>  virQEMUDriverConfigLoadVNCEntry(virQEMUDriverConfigPtr cfg,
>                                  virConfPtr conf)
> @@ -485,6 +503,7 @@ virQEMUDriverConfigLoadSPICEEntry(virQEMUDriverConfigPtr cfg,
>      return 0;
>  }
>  
> +

Ironically unrelated, but fine IDC.

Reviewed-by: John Ferlan <jferlan redhat com>

John

[...]


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