aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/main.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-09 18:33:31 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-02-09 18:33:31 +0000
commit684315da98921a483d7c7bd2effc16a95aee6b93 (patch)
tree2f8f84d55fb3c91cdf4f7ce688b88a4809ce38a1 /extras/mini-os/main.c
parentca8a593cc7ff51d6360d16fce31f934c3026ded2 (diff)
downloadxen-684315da98921a483d7c7bd2effc16a95aee6b93.tar.gz
xen-684315da98921a483d7c7bd2effc16a95aee6b93.tar.bz2
xen-684315da98921a483d7c7bd2effc16a95aee6b93.zip
mini-os: create app-specific configuration
Instead of using CONFIG_QEMU and CONFIG_GRUB to enable or disable minios code, create CONFIG_ items for features and use application-specific configuration files to enable or disable the features. The configuration flags are currently added to the compiler command line; as the number of flags grows this may need to move to a header. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/main.c')
-rw-r--r--extras/mini-os/main.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/extras/mini-os/main.c b/extras/mini-os/main.c
index b95b889e16..aeda548f72 100644
--- a/extras/mini-os/main.c
+++ b/extras/mini-os/main.c
@@ -43,13 +43,13 @@ extern char __app_bss_start, __app_bss_end;
static void call_main(void *p)
{
char *c, quote;
-#ifdef CONFIG_QEMU
+#ifdef CONFIG_QEMU_XS_ARGS
char *domargs, *msg;
#endif
int argc;
char **argv;
char *envp[] = { NULL };
-#ifdef CONFIG_QEMU
+#ifdef CONFIG_QEMU_XS_ARGS
char *vm;
char path[128];
int domid;
@@ -60,15 +60,15 @@ static void call_main(void *p)
* crashing. */
//sleep(1);
-#ifndef CONFIG_GRUB
+#ifdef CONFIG_SPARSE_BSS
sparse((unsigned long) &__app_bss_start, &__app_bss_end - &__app_bss_start);
-#if defined(HAVE_LWIP) && !defined(CONFIG_QEMU)
- start_networking();
#endif
+#if defined(HAVE_LWIP) && defined(CONFIG_START_NETWORK)
+ start_networking();
#endif
create_thread("pcifront", pcifront_watches, NULL);
-#ifdef CONFIG_QEMU
+#ifdef CONFIG_QEMU_XS_ARGS
/* Fetch argc, argv from XenStore */
domid = xenbus_read_integer("target");
if (domid == -1) {
@@ -132,7 +132,7 @@ static void call_main(void *p)
#define PARSE_ARGS_STORE(ARGS) PARSE_ARGS(ARGS, argv[argc++] = c, memmove(c, c + 1, strlen(c + 1) + 1), *c++ = 0)
PARSE_ARGS_COUNT((char*)start_info.cmd_line);
-#ifdef CONFIG_QEMU
+#ifdef CONFIG_QEMU_XS_ARGS
PARSE_ARGS_COUNT(domargs);
#endif
@@ -141,7 +141,7 @@ static void call_main(void *p)
argc = 1;
PARSE_ARGS_STORE((char*)start_info.cmd_line)
-#ifdef CONFIG_QEMU
+#ifdef CONFIG_QEMU_XS_ARGS
PARSE_ARGS_STORE(domargs)
#endif