Re: [RFC 6/7] Deprecate missing machine type in virDomainDefineXMLFlags()

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

 



On Tue, Oct 02, 2018 at 16:14:45 +0200, Andrea Bolognani wrote:
> This time we don't want to deprecate the API itself; instead,
> we want warning to be reported whenever some specific condition
> is met.
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  src/conf/domain_conf.c | 11 ++++++++---
>  src/libvirt-domain.c   |  1 +
>  2 files changed, 9 insertions(+), 3 deletions(-)
> 
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 9911d56130..da0f1ed025 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -19114,9 +19114,14 @@ virDomainDefParseCaps(virDomainDefPtr def,
>      } else {
>          if (!def->os.arch)
>              def->os.arch = capsdata->arch;
> -        if ((!def->os.machine &&
> -             VIR_STRDUP(def->os.machine, capsdata->machinetype) < 0))
> -            goto cleanup;
> +        if (!def->os.machine) {
> +            virReportWarning(VIR_ERR_DEPRECATED_FEATURE,
> +                             "%s",
> +                             _("Missing machine type"));

Soo, and if multiple warnings are present? Since we don't support
multiple error objects this will create one warning and after you fix it
a second one.

Also I doubt that LXC has a machine type.


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