Changeset c8cbd39 in mainline for kernel/generic/src/main/kinit.c
- Timestamp:
- 2012-08-16T10:59:59Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 04da852
- Parents:
- 5882487
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
r5882487 rc8cbd39 69 69 #include <str.h> 70 70 #include <sysinfo/stats.h> 71 #include <sysinfo/sysinfo.h> 71 72 #include <align.h> 72 73 … … 179 180 program_t programs[CONFIG_INIT_TASKS]; 180 181 182 // FIXME: do not propagate arguments through sysinfo 183 // but pass them directly to the tasks 184 for (i = 0; i < init.cnt; i++) { 185 const char *arguments = init.tasks[i].arguments; 186 if (str_length(arguments) == 0) 187 continue; 188 if (str_length(init.tasks[i].name) == 0) 189 continue; 190 size_t arguments_size = str_size(arguments); 191 192 void *arguments_copy = malloc(arguments_size, 0); 193 if (arguments_copy == NULL) 194 continue; 195 memcpy(arguments_copy, arguments, arguments_size); 196 197 char item_name[CONFIG_TASK_NAME_BUFLEN + 15]; 198 snprintf(item_name, CONFIG_TASK_NAME_BUFLEN + 15, 199 "init_args.%s", init.tasks[i].name); 200 201 sysinfo_set_item_data(item_name, NULL, arguments_copy, arguments_size); 202 } 203 181 204 for (i = 0; i < init.cnt; i++) { 182 205 if (init.tasks[i].paddr % FRAME_SIZE) {
Note:
See TracChangeset
for help on using the changeset viewer.