[libvirt] [libvirt-glib 1/6] Getters for GVirConfigDomainInterface attributes

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Feb 29 21:22:52 UTC 2012


On Wed, Feb 29, 2012 at 2:57 PM, Christophe Fergeau <cfergeau at redhat.com> wrote:
> On Tue, Feb 28, 2012 at 08:25:02PM +0200, Zeeshan Ali (Khattak) wrote:
>> From: "Zeeshan Ali (Khattak)" <zeeshanak at 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




More information about the libvir-list mailing list