diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2005-07-27 14:43:31 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:25:48 -0400 |
commit | cb66504d65e54210d7dc55a0027d309ca5f51f83 (patch) | |
tree | 0d292ced5cce778bc16387b1d928117aead52996 /arch/um/kernel/um_arch.c | |
parent | b6b038a24a826fe22d9823722cfbbbd3ad7a3021 (diff) |
[PATCH] uml: add skas0 command-line option
This adds the "skas0" parameter to force skas0 operation on SKAS3 host and
shows which operating mode has been selected.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/kernel/um_arch.c')
-rw-r--r-- | arch/um/kernel/um_arch.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 8736d098f0ee..ca2bb6f09a7d 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -38,6 +38,9 @@ | |||
38 | #include "choose-mode.h" | 38 | #include "choose-mode.h" |
39 | #include "mode_kern.h" | 39 | #include "mode_kern.h" |
40 | #include "mode.h" | 40 | #include "mode.h" |
41 | #ifdef UML_CONFIG_MODE_SKAS | ||
42 | #include "skas.h" | ||
43 | #endif | ||
41 | 44 | ||
42 | #define DEFAULT_COMMAND_LINE "root=98:0" | 45 | #define DEFAULT_COMMAND_LINE "root=98:0" |
43 | 46 | ||
@@ -318,6 +321,7 @@ int linux_main(int argc, char **argv) | |||
318 | unsigned long avail, diff; | 321 | unsigned long avail, diff; |
319 | unsigned long virtmem_size, max_physmem; | 322 | unsigned long virtmem_size, max_physmem; |
320 | unsigned int i, add; | 323 | unsigned int i, add; |
324 | char * mode; | ||
321 | 325 | ||
322 | for (i = 1; i < argc; i++){ | 326 | for (i = 1; i < argc; i++){ |
323 | if((i == 1) && (argv[i][0] == ' ')) continue; | 327 | if((i == 1) && (argv[i][0] == ' ')) continue; |
@@ -338,6 +342,21 @@ int linux_main(int argc, char **argv) | |||
338 | exit(1); | 342 | exit(1); |
339 | } | 343 | } |
340 | #endif | 344 | #endif |
345 | |||
346 | #ifndef CONFIG_MODE_SKAS | ||
347 | mode = "TT"; | ||
348 | #else | ||
349 | /* Show to the user the result of selection */ | ||
350 | if (mode_tt) | ||
351 | mode = "TT"; | ||
352 | else if (proc_mm && ptrace_faultinfo) | ||
353 | mode = "SKAS3"; | ||
354 | else | ||
355 | mode = "SKAS0"; | ||
356 | #endif | ||
357 | |||
358 | printf("UML running in %s mode\n", mode); | ||
359 | |||
341 | uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, | 360 | uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, |
342 | &host_task_size, &task_size); | 361 | &host_task_size, &task_size); |
343 | 362 | ||