aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/main.c')
-rw-r--r--arch/um/os-Linux/main.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 919c25be254a..425aa8960649 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -25,9 +25,6 @@
25#include "um_malloc.h" 25#include "um_malloc.h"
26#include "kern_constants.h" 26#include "kern_constants.h"
27 27
28/* Set in main, unchanged thereafter */
29char *linux_prog;
30
31#define PGD_BOUND (4 * 1024 * 1024) 28#define PGD_BOUND (4 * 1024 * 1024)
32#define STACKSIZE (8 * 1024 * 1024) 29#define STACKSIZE (8 * 1024 * 1024)
33#define THREAD_NAME_LEN (256) 30#define THREAD_NAME_LEN (256)
@@ -125,35 +122,6 @@ int __init main(int argc, char **argv, char **envp)
125 char **new_argv; 122 char **new_argv;
126 int ret, i, err; 123 int ret, i, err;
127 124
128#ifdef UML_CONFIG_CMDLINE_ON_HOST
129 /* Allocate memory for thread command lines */
130 if(argc < 2 || strlen(argv[1]) < THREAD_NAME_LEN - 1){
131
132 char padding[THREAD_NAME_LEN] = {
133 [ 0 ... THREAD_NAME_LEN - 2] = ' ', '\0'
134 };
135
136 new_argv = malloc((argc + 2) * sizeof(char*));
137 if(!new_argv) {
138 perror("Allocating extended argv");
139 exit(1);
140 }
141
142 new_argv[0] = argv[0];
143 new_argv[1] = padding;
144
145 for(i = 2; i <= argc; i++)
146 new_argv[i] = argv[i - 1];
147 new_argv[argc + 1] = NULL;
148
149 execvp(new_argv[0], new_argv);
150 perror("execing with extended args");
151 exit(1);
152 }
153#endif
154
155 linux_prog = argv[0];
156
157 set_stklim(); 125 set_stklim();
158 126
159 setup_env_path(); 127 setup_env_path();