Re: [PATCH 13/23] qemu_conf: split out virQEMUDriverConfigLoadDeviceEntry

[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 | 45 +++++++++++++++++++++++++++-----------------
>  1 file changed, 28 insertions(+), 17 deletions(-)
> 
> diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
> index b555e33e7b..776ba3f3ad 100644
> --- a/src/qemu/qemu_conf.c
> +++ b/src/qemu/qemu_conf.c
> @@ -423,6 +423,31 @@ virQEMUDriverConfigHugeTLBFSInit(virHugeTLBFSPtr hugetlbfs,
>  }
>  
>  
> +static int
> +virQEMUDriverConfigLoadDeviceEntry(virQEMUDriverConfigPtr cfg,
> +                                   virConfPtr conf)
> +{
> +    bool tmp;
> +    int rv;
> +
> +    if (virConfGetValueBool(conf, "mac_filter", &cfg->macFilter) < 0)
> +        return -1;
> +
> +    if (virConfGetValueBool(conf, "relaxed_acs_check", &cfg->relaxedACS) < 0)
> +        return -1;
> +    if (virConfGetValueString(conf, "lock_manager", &cfg->lockManagerName) < 0)
> +        return -1;
> +    if ((rv = virConfGetValueBool(conf, "allow_disk_format_probing", &tmp)) < 0)
> +        return -1;
> +    if (rv == 1 && tmp) {
> +        virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> +                       _("allow_disk_format_probing is no longer supported"));
> +        return -1;
> +    }
> +
> +    return 0;
> +}
> +

blank line

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