WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] Fix xm network-list/block-list/vtpm-list

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] Fix xm network-list/block-list/vtpm-list
From: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
Date: Thu, 22 Jun 2006 22:22:43 +0900
Delivery-date: Thu, 22 Jun 2006 06:24:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi,

When I tested xm commands, I saw the following error messages.
The cause is because arg_check() counts a split(--). 

#xm network-list -l -- -vm1
Error: 'xm network-list' requires between 1 and 2 arguments.

#xm block-list -l -- -vm1
Error: 'xm block-list' requires between 1 and 2 arguments.

#xm vtpm-list -l -- -vm1
Error: 'xm vtpm-list' requires between 1 and 2 arguments.


I corrected for arg_check() not to count the split(--).
The following are test results.

# xm network-list -l -- -vm1
(0
    ((backend-id 0)
        (mac 00:16:3e:10:56:fa)
        (handle 0)
        (state 4)
        (backend /local/domain/0/backend/vif/11/0)
        (tx-ring-ref 521)
        (rx-ring-ref 522)
        (event-channel 7)
    )
)
# xm network-list --long -- -vm1
(0
    ((backend-id 0)
        (mac 00:16:3e:10:56:fa)
        (handle 0)
        (state 4)
        (backend /local/domain/0/backend/vif/11/0)
        (tx-ring-ref 521)
        (rx-ring-ref 522)
        (event-channel 7)
    )
)

# xm block-list --long -- -vm1
(2049
    ((virtual-device 2049)
        (backend-id 0)
        (state 4)
        (backend /local/domain/0/backend/vbd/12/2049)
        (ring-ref 8)
        (event-channel 6)
    )
)
# xm block-list -l -- -vm1
(2049
    ((virtual-device 2049)
        (backend-id 0)
        (state 4)
        (backend /local/domain/0/backend/vbd/12/2049)
        (ring-ref 8)
        (event-channel 6)
    )
)

# xm vtpm-list -l -- -vm1
(0
    ((backend-id 0)
        (state 1)
        (handle 0)
        (backend /local/domain/0/backend/vtpm/10/0)
    )
)
# xm vtpm-list --long -- -vm1
(0
    ((backend-id 0)
        (state 1)
        (handle 0)
        (backend /local/domain/0/backend/vtpm/10/0)
    )
)

Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>

Best regards,
 Kan

Attachment: arg_check.patch
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>