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

Re: [libvirt] [PATCH 1/2] virsh: extend domif-{get, set}link command to accept target name as a parameter



long subject line; I trimmed it to:

virsh: let domif-{get,set}link take target name

On 01/19/2012 11:30 PM, Taku Izumi wrote:
> 
> Other virsh domifXXX commands can accept target name 
> as a parameter to specify interface. From viewpoint of
> consistency, virsh domif-getlink command should accept
> target name as a parameter. This patch achieves this.
> 

> +    unsigned char macaddr[VIR_MAC_BUFLEN];
> +    const char *element;
> +    const char *attribute;

The libxml2 writers should be shot for polluting the global namespace
with nice-to-use names:

virsh.c: In function 'cmdDomIfGetLink':
virsh.c:1515:17: error: declaration of 'attribute' shadows a global
declaration [-Werror=shadow]
/usr/include/libxml2/libxml/SAX.h:104:3: error: shadowed declaration is
here [-Werror=shadow]

libxml2-devel-2.7.8-6.fc16.x86_64

(and yes, I know that DV reads this list - the real problem is that we
must still compile on RHEL 5, and therefore must use
LIBXML_LEGACY_ENABLED - using the upstream library without back-compat
does not suffer from pollution ;)

I renamed the virsh variable to attr to get around that stupidity.

>  
> -                if (STRCASEEQ(mac, iface)){
> -                    VIR_FREE(mac);
> +                if (STRCASEEQ(value, iface)){
> +                    VIR_FREE(value);

As long as we're touching this, I added the missing space before {.

ACK and pushed.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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