ia64/xen-unstable
changeset 17811:8b5b0512ed6a
stubdom: fetch command line from start_info instead of xenstore
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
author | Keir Fraser <keir.fraser@citrix.com> |
---|---|
date | Mon Jun 09 13:26:05 2008 +0100 (2008-06-09) |
parents | 5e5f3970f66f |
children | 2197a263a300 |
files | extras/mini-os/main.c |
line diff
1.1 --- a/extras/mini-os/main.c Mon Jun 09 13:25:35 2008 +0100 1.2 +++ b/extras/mini-os/main.c Mon Jun 09 13:26:05 2008 +0100 1.3 @@ -41,16 +41,18 @@ void _fini(void) 1.4 extern char __app_bss_start, __app_bss_end; 1.5 static void call_main(void *p) 1.6 { 1.7 - char *args, /**path,*/ *msg, *c; 1.8 + char *c; 1.9 #ifdef CONFIG_QEMU 1.10 - char *domargs; 1.11 + char *domargs, *msg; 1.12 #endif 1.13 int argc; 1.14 char **argv; 1.15 char *envp[] = { NULL }; 1.16 +#ifdef CONFIG_QEMU 1.17 char *vm; 1.18 + char path[128]; 1.19 +#endif 1.20 int i; 1.21 - char path[128]; 1.22 1.23 /* Let other parts initialize (including console output) before maybe 1.24 * crashing. */ 1.25 @@ -94,22 +96,6 @@ static void call_main(void *p) 1.26 } 1.27 #endif 1.28 1.29 - msg = xenbus_read(XBT_NIL, "vm", &vm); 1.30 - if (msg) { 1.31 - printk("Couldn't read vm path\n"); 1.32 - do_exit(); 1.33 - } 1.34 - 1.35 - printk("my vm is at %s\n", vm); 1.36 - snprintf(path, sizeof(path), "%s/image/cmdline", vm); 1.37 - free(vm); 1.38 - msg = xenbus_read(XBT_NIL, path, &args); 1.39 - 1.40 - if (msg) { 1.41 - printk("Couldn't get my args: %s\n", msg); 1.42 - args = strdup(""); 1.43 - } 1.44 - 1.45 argc = 1; 1.46 1.47 #define PARSE_ARGS(ARGS,START,END) \ 1.48 @@ -126,7 +112,7 @@ static void call_main(void *p) 1.49 } \ 1.50 } 1.51 1.52 - PARSE_ARGS(args, argc++, ); 1.53 + PARSE_ARGS(start_info.cmd_line, argc++, ); 1.54 #ifdef CONFIG_QEMU 1.55 PARSE_ARGS(domargs, argc++, ); 1.56 #endif 1.57 @@ -135,7 +121,7 @@ static void call_main(void *p) 1.58 argv[0] = "main"; 1.59 argc = 1; 1.60 1.61 - PARSE_ARGS(args, argv[argc++] = c, *c++ = 0) 1.62 + PARSE_ARGS(start_info.cmd_line, argv[argc++] = c, *c++ = 0) 1.63 #ifdef CONFIG_QEMU 1.64 PARSE_ARGS(domargs, argv[argc++] = c, *c++ = 0) 1.65 #endif