Changeset 33c2952 in mainline for kernel/generic/src/main/kinit.c
- Timestamp:
- 2012-11-07T21:00:02Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dcb0751
- Parents:
- fc89e32 (diff), 94795812 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
rfc89e32 r33c2952 69 69 #include <str.h> 70 70 #include <sysinfo/stats.h> 71 #include <sysinfo/sysinfo.h> 71 72 #include <align.h> 72 73 … … 189 190 program_t programs[CONFIG_INIT_TASKS]; 190 191 192 // FIXME: do not propagate arguments through sysinfo 193 // but pass them directly to the tasks 194 for (i = 0; i < init.cnt; i++) { 195 const char *arguments = init.tasks[i].arguments; 196 if (str_length(arguments) == 0) 197 continue; 198 if (str_length(init.tasks[i].name) == 0) 199 continue; 200 size_t arguments_size = str_size(arguments); 201 202 void *arguments_copy = malloc(arguments_size, 0); 203 if (arguments_copy == NULL) 204 continue; 205 memcpy(arguments_copy, arguments, arguments_size); 206 207 char item_name[CONFIG_TASK_NAME_BUFLEN + 15]; 208 snprintf(item_name, CONFIG_TASK_NAME_BUFLEN + 15, 209 "init_args.%s", init.tasks[i].name); 210 211 sysinfo_set_item_data(item_name, NULL, arguments_copy, arguments_size); 212 } 213 191 214 for (i = 0; i < init.cnt; i++) { 192 215 if (init.tasks[i].paddr % FRAME_SIZE) {
Note:
See TracChangeset
for help on using the changeset viewer.