Re: [libvirt-designer PATCHv3 5/9] Automatically add SPICE channel with SPICE graphics

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

 



On Tue, Jun 04, 2013 at 07:11:23PM +0200, Michal Privoznik wrote:
> > +static gboolean
> > +gvir_designer_domain_has_spice_channel(GVirDesignerDomain *design)
> > +{
> > +    GList *devices;
> > +    GList *it;
> > +    gboolean has_spice = FALSE;
> > +
> > +    devices = gvir_designer_domain_get_device_by_type(design,
> > +                                                      GVIR_CONFIG_TYPE_DOMAIN_CHANNEL);
> > +    for (it = devices; it != NULL; it = it->next) {
> > +        GVirConfigDomainChannel *channel;
> > +        const char *target_name;
> > +        channel = GVIR_CONFIG_DOMAIN_CHANNEL(it->data);
> > +        target_name = gvir_config_domain_channel_get_target_name(channel);
> > +        if (g_strcmp0(target_name, GVIR_DESIGNER_SPICE_CHANNEL_NAME) == 0) {
> > +            /* FIXME could do more sanity checks (check if the channel
> > +             * source has the 'spicevmc' type)
> > +             */
> > +            GVirConfigDomainChannelTargetType target_type;
> > +            target_type = gvir_config_domain_channel_get_target_type(channel);
> > +            if (target_type == GVIR_CONFIG_DOMAIN_CHANNEL_TARGET_VIRTIO) {
> > +                has_spice = TRUE;
> > +            } else {
> > +                g_critical("Inconsistent SPICE channel, target type is wrong (%d)",
> > +                           target_type);
> 
> Is this really a critical issue? What about g_warning instead?

This means the domain XML has a very unexpected content, so I'd tend to tag
that as g_critical (which is not much different from g_warning anyway). I
don't mind changing it to g_warning.

Christophe

Attachment: pgpUxKz6orcel.pgp
Description: PGP signature

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