[libvirt] [PATCH 1/2] virsh: extend domif-{get, set}link command to accept target name as a parameter
Eric Blake
eblake at redhat.com
Fri Jan 20 23:47:31 UTC 2012
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 at redhat.com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120120/6060eea2/attachment-0001.sig>
More information about the libvir-list
mailing list