Re: [libvirt PATCH] qemu: Fix memstat for (non-)transitional memballoon

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

 



On Tue, 2021-01-12 at 19:56 +0100, Peter Krempa wrote:
> On Tue, Jan 12, 2021 at 18:47:36 +0100, Andrea Bolognani wrote:
> > +        switch (balloon->model) {
> 
> This is an 'int'. Please typecast it appropriately ...
> 
> > +            case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO:
> > +                name = "virtio-balloon-pci";
> > +                break;
> > +            case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_TRANSITIONAL:
> > +                name = "virtio-balloon-pci-transitional";
> > +                break;
> > +            case VIR_DOMAIN_MEMBALLOON_MODEL_VIRTIO_NON_TRANSITIONAL:
> > +                name = "virtio-balloon-pci-non-transitional";
> > +                break;
> > +            case VIR_DOMAIN_MEMBALLOON_MODEL_XEN:
> > +            case VIR_DOMAIN_MEMBALLOON_MODEL_NONE:
> > +                virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
> > +                        _("invalid model for virtio-balloon-pci"));
> > +                return;
> > +            case VIR_DOMAIN_MEMBALLOON_MODEL_LAST:
> > +            default:
> > +                virReportEnumRangeError(virDomainMemballoonModel,
> > +                                        balloon->model);
> > +                return;
> 
> ... so that this actually makes sense and is kept up to date.

Right you are! Very good catch, thank you :)

Do you want me to respin, or can I just add the
virDomainMemballoonModel cast before pushing?

-- 
Andrea Bolognani / Red Hat / Virtualization




[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