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-changelog

[Xen-changelog] [xen-unstable] xl: fix network-attach command line parsi

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xl: fix network-attach command line parsing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 04 Jun 2010 03:45:22 -0700
Delivery-date: Fri, 04 Jun 2010 03:46:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1275642599 -3600
# Node ID e3f625e16ba324317f42d1c0a6c5be0d6edc2eaa
# Parent  9002641064d8e3278e9a2b0bbe3150c8cd181b4d
xl: fix network-attach command line parsing

Command line arguments start at argv[2].

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff -r 9002641064d8 -r e3f625e16ba3 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Fri Jun 04 10:09:11 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Fri Jun 04 10:09:59 2010 +0100
@@ -3380,11 +3380,11 @@ int main_networkattach(int argc, char **
     int i;
     unsigned int val;
 
-    if ((argc < 2) || (argc > 11)) {
+    if ((argc < 3) || (argc > 11)) {
         help("network-attach");
         exit(0);
     }
-    while ((opt = getopt(argc, argv, "hl")) != -1) {
+    while ((opt = getopt(argc, argv, "h")) != -1) {
         switch (opt) {
         case 'h':
             help("network-attach");
@@ -3395,12 +3395,12 @@ int main_networkattach(int argc, char **
         }
     }
 
-    if (domain_qualifier_to_domid(argv[1], &domid, 0) < 0) {
-        fprintf(stderr, "%s is an invalid domain identifier\n", argv[1]);
+    if (domain_qualifier_to_domid(argv[2], &domid, 0) < 0) {
+        fprintf(stderr, "%s is an invalid domain identifier\n", argv[2]);
         exit(1);
     }
     init_nic_info(&nic, -1);
-    for (argv += 2, argc -= 2; argc > 0; ++argv, --argc) {
+    for (argv += 3, argc -= 3; argc > 0; ++argv, --argc) {
         if (!strncmp("type=", *argv, 5)) {
             if (!strncmp("vif", (*argv) + 5, 4)) {
                 nic.nictype = NICTYPE_VIF;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xl: fix network-attach command line parsing, Xen patchbot-unstable <=