aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/main.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-09 13:26:05 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-09 13:26:05 +0100
commit0ba222a6fd5c72bda66eb3678c44fe3e43bbc6c0 (patch)
tree1312519ccbbc3af25c5703714c500e78027c1cd7 /extras/mini-os/main.c
parent7e4196ee73dd4e75dedf144c0fa4e5798ce05081 (diff)
downloadxen-0ba222a6fd5c72bda66eb3678c44fe3e43bbc6c0.tar.gz
xen-0ba222a6fd5c72bda66eb3678c44fe3e43bbc6c0.tar.bz2
xen-0ba222a6fd5c72bda66eb3678c44fe3e43bbc6c0.zip
stubdom: fetch command line from start_info instead of xenstore
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/main.c')
-rw-r--r--extras/mini-os/main.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/extras/mini-os/main.c b/extras/mini-os/main.c
index 585578ca33..d31a4b4c2d 100644
--- a/extras/mini-os/main.c
+++ b/extras/mini-os/main.c
@@ -41,16 +41,18 @@ void _fini(void)
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;
- int i;
char path[128];
+#endif
+ int i;
/* 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