From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: Xen-devel@lists.xensource.com
Subject: [PATCH] stubdom: fetch command line from start_info instead of xenstore
Date: Mon, 9 Jun 2008 12:02:04 +0100 [thread overview]
Message-ID: <20080609110204.GM4264@implementation.uk.xensource.com> (raw)
stubdom: fetch command line from start_info instead of xenstore
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
diff -r a40c23c25b0d extras/mini-os/main.c
--- a/extras/mini-os/main.c Mon Jun 09 09:51:14 2008 +0100
+++ b/extras/mini-os/main.c Mon Jun 09 10:14:05 2008 +0100
@@ -41,16 +41,18 @@
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 @@
}
#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 @@
} \
}
- PARSE_ARGS(args, argc++, );
+ PARSE_ARGS(start_info.cmd_line, argc++, );
#ifdef CONFIG_QEMU
PARSE_ARGS(domargs, argc++, );
#endif
@@ -135,7 +121,7 @@
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
reply other threads:[~2008-06-09 11:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080609110204.GM4264@implementation.uk.xensource.com \
--to=samuel.thibault@eu.citrix.com \
--cc=Xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.