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] stubdom: fetch command line from start_in

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] stubdom: fetch command line from start_info instead of xenstore
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 10 Jun 2008 03:40:38 -0700
Delivery-date: Tue, 10 Jun 2008 03:41:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1213014365 -3600
# Node ID 8b5b0512ed6a2eb849f2d1b8b694eab8600244dd
# Parent  5e5f3970f66fb57fbe32bf03cfc9b60f1c590341
stubdom: fetch command line from start_info instead of xenstore

Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx>
---
 extras/mini-os/main.c |   28 +++++++---------------------
 1 files changed, 7 insertions(+), 21 deletions(-)

diff -r 5e5f3970f66f -r 8b5b0512ed6a extras/mini-os/main.c
--- a/extras/mini-os/main.c     Mon Jun 09 13:25:35 2008 +0100
+++ b/extras/mini-os/main.c     Mon Jun 09 13:26:05 2008 +0100
@@ -41,16 +41,18 @@ extern char __app_bss_start, __app_bss_e
 extern char __app_bss_start, __app_bss_end;
 static void call_main(void *p)
 {
-    char *args, /**path,*/ *msg, *c;
+    char *c;
 #ifdef CONFIG_QEMU
-    char *domargs;
+    char *domargs, *msg;
 #endif
     int argc;
     char **argv;
     char *envp[] = { NULL };
+#ifdef CONFIG_QEMU
     char *vm;
+    char path[128];
+#endif
     int i;
-    char path[128];
 
     /* Let other parts initialize (including console output) before maybe
      * crashing. */
@@ -94,22 +96,6 @@ static void call_main(void *p)
     }
 #endif
 
-    msg = xenbus_read(XBT_NIL, "vm", &vm);
-    if (msg) {
-        printk("Couldn't read vm path\n");
-        do_exit();
-    }
-
-    printk("my vm is at %s\n", vm);
-    snprintf(path, sizeof(path), "%s/image/cmdline", vm);
-    free(vm);
-    msg = xenbus_read(XBT_NIL, path, &args);
-
-    if (msg) {
-        printk("Couldn't get my args: %s\n", msg);
-        args = strdup("");
-    }
-
     argc = 1;
 
 #define PARSE_ARGS(ARGS,START,END) \
@@ -126,7 +112,7 @@ static void call_main(void *p)
        } \
     }
 
-    PARSE_ARGS(args, argc++, );
+    PARSE_ARGS(start_info.cmd_line, argc++, );
 #ifdef CONFIG_QEMU
     PARSE_ARGS(domargs, argc++, );
 #endif
@@ -135,7 +121,7 @@ static void call_main(void *p)
     argv[0] = "main";
     argc = 1;
 
-    PARSE_ARGS(args, argv[argc++] = c, *c++ = 0)
+    PARSE_ARGS(start_info.cmd_line, argv[argc++] = c, *c++ = 0)
 #ifdef CONFIG_QEMU
     PARSE_ARGS(domargs, argv[argc++] = c, *c++ = 0)
 #endif

_______________________________________________
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] stubdom: fetch command line from start_info instead of xenstore, Xen patchbot-unstable <=