[libvirt] [PATCH v2] virsh: Do not check the input XML at virsh layer for cmdDetachDevice

Daniel P. Berrange berrange at redhat.com
Tue Feb 7 15:46:36 UTC 2012


On Wed, Feb 08, 2012 at 12:12:53AM +0800, Osier Yang wrote:
> Any device XML doesn't use the same order as libvirt generates, or
> uses decimal for attributes like "slot" of "<address>" will cause
> device detaching to fail, as virsh compares the XML simply earlier
> in strict manner before internal parsing.
> 
> This is regression introduced by ea7182c.
> 
> v1 is here:
> https://www.redhat.com/archives/libvir-list/2012-January/msg00395.html
> 
> v1 - v2:
>    * The two useful functions is left unchanged, marked as unused.
> ---
>  tools/virsh.c |   23 +++++------------------
>  1 files changed, 5 insertions(+), 18 deletions(-)
> 
> diff --git a/tools/virsh.c b/tools/virsh.c
> index 72ca93a..7997cbb 100644
> --- a/tools/virsh.c
> +++ b/tools/virsh.c
> @@ -13153,6 +13153,7 @@ cmdAttachDevice(vshControl *ctl, const vshCmd *cmd)
>   * @n2 second node
>   * returns true in case n1 covers n2, false otherwise.
>   */
> +__attribute__((unused))

We have a macro for this -   ATTRIBUTE_UNUSED

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|




More information about the libvir-list mailing list