[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libvir-list
Subject:    Re: [libvirt] [libvirt-glib 1/6] Getters for GVirConfigDomainInterface attributes
From:       "Zeeshan Ali (Khattak)" <zeeshanak () gnome ! org>
Date:       2012-02-29 21:22:52
Message-ID: CAAa3hFPvSK7MyaYFOcXA_NrHsfsDB0Ormn4DyDS2YbXRj3ySvQ () mail ! gmail ! com
[Download RAW message or body]

On Wed, Feb 29, 2012 at 2:57 PM, Christophe Fergeau <cfergeau@redhat.com> wrote:
> On Tue, Feb 28, 2012 at 08:25:02PM +0200, Zeeshan Ali (Khattak) wrote:
> > From: "Zeeshan Ali (Khattak)" <zeeshanak@gnome.org>
> > 
> > ---
> > libvirt-gconfig/libvirt-gconfig-domain-interface.c |   35 ++++++++++++++++++++
> > libvirt-gconfig/libvirt-gconfig-domain-interface.h |    4 ++
> > libvirt-gconfig/libvirt-gconfig.sym                |    4 ++
> > 3 files changed, 43 insertions(+), 0 deletions(-)
> > 
> > diff --git a/libvirt-gconfig/libvirt-gconfig-domain-interface.c \
> > b/libvirt-gconfig/libvirt-gconfig-domain-interface.c index 85cc194..61d35bd \
> >                 100644
> > --- a/libvirt-gconfig/libvirt-gconfig-domain-interface.c
> > +++ b/libvirt-gconfig/libvirt-gconfig-domain-interface.c
> > @@ -96,6 +96,41 @@ void \
> > gvir_config_domain_interface_set_model(GVirConfigDomainInterface *interface \
> > "model", "type", model); }
> > 
> > +const char *gvir_config_domain_interface_get_ifname(GVirConfigDomainInterface \
> > *interface)
> 
> Unless I'm missing something, this should not be const (caller needs to
> free the returned string).
> 
> > +{
> > +    g_return_val_if_fail(GVIR_CONFIG_IS_DOMAIN_INTERFACE(interface), NULL);
> > +
> > +    return gvir_config_object_get_attribute(GVIR_CONFIG_OBJECT(interface),
> > +                                            "target", "device");
> 
> This is "dev", not "device"

Turns out that i copy&pasted the "device" from the corresponding
setter. Wonder if this explains why I see a flat network graph in
boxes for every domain..

-- 
Regards,

Zeeshan Ali (Khattak)
FSF member#5124


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic