Changes in kernel/generic/src/main/kinit.c [67b152e:6eef3c4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
r67b152e r6eef3c4 69 69 #include <str.h> 70 70 #include <sysinfo/stats.h> 71 #include <sysinfo/sysinfo.h>72 71 #include <align.h> 73 72 … … 172 171 #endif /* CONFIG_KCONSOLE */ 173 172 174 /*175 * Store the default stack size in sysinfo so that uspace can create176 * stack with this default size.177 */178 sysinfo_set_item_val("default.stack_size", NULL, STACK_SIZE_USER);179 180 173 interrupts_enable(); 181 174 … … 186 179 program_t programs[CONFIG_INIT_TASKS]; 187 180 188 // FIXME: do not propagate arguments through sysinfo189 // but pass them directly to the tasks190 for (i = 0; i < init.cnt; i++) {191 const char *arguments = init.tasks[i].arguments;192 if (str_length(arguments) == 0)193 continue;194 if (str_length(init.tasks[i].name) == 0)195 continue;196 size_t arguments_size = str_size(arguments);197 198 void *arguments_copy = malloc(arguments_size, 0);199 if (arguments_copy == NULL)200 continue;201 memcpy(arguments_copy, arguments, arguments_size);202 203 char item_name[CONFIG_TASK_NAME_BUFLEN + 15];204 snprintf(item_name, CONFIG_TASK_NAME_BUFLEN + 15,205 "init_args.%s", init.tasks[i].name);206 207 sysinfo_set_item_data(item_name, NULL, arguments_copy, arguments_size);208 }209 210 181 for (i = 0; i < init.cnt; i++) { 211 182 if (init.tasks[i].paddr % FRAME_SIZE) {
Note:
See TracChangeset
for help on using the changeset viewer.