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

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

 




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

John

[...]

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