# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275642625 -3600
# Node ID c005ef20189e3d4a989be64eb9d31a6eda831240
# Parent e3f625e16ba324317f42d1c0a6c5be0d6edc2eaa
xl: fix network-list command line parsing
Command line arguments start at argv[2].
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
tools/libxl/xl_cmdimpl.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff -r e3f625e16ba3 -r c005ef20189e tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c Fri Jun 04 10:09:59 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c Fri Jun 04 10:10:25 2010 +0100
@@ -3461,11 +3461,11 @@ int main_networklist(int argc, char **ar
libxl_nicinfo *nics;
unsigned int nb;
- if (argc < 2) {
+ if (argc < 3) {
help("network-list");
exit(1);
}
- while ((opt = getopt(argc, argv, "hl")) != -1) {
+ while ((opt = getopt(argc, argv, "h")) != -1) {
switch (opt) {
case 'h':
help("network-list");
@@ -3479,7 +3479,7 @@ int main_networklist(int argc, char **ar
/* Idx BE MAC Hdl Sta evch txr/rxr BE-path */
printf("%-3s %-2s %-17s %-6s %-5s %-6s %5s/%-5s %-30s\n",
"Idx", "BE", "Mac Addr.", "handle", "state", "evt-ch", "tx-",
"rx-ring-ref", "BE-path");
- for (++argv, --argc; argc > 0; --argc, ++argv) {
+ for (argv += 2, argc -= 2; argc > 0; --argc, ++argv) {
if (domain_qualifier_to_domid(*argv, &domid, 0) < 0) {
fprintf(stderr, "%s is an invalid domain identifier\n", *argv);
continue;
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|