Changeset 20f1597 in mainline for kernel/generic/src/main/kinit.c
- Timestamp:
- 2009-03-02T22:13:30Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 561db3f
- Parents:
- 16da5f8e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/main/kinit.c
r16da5f8e r20f1597 65 65 #include <lib/rd.h> 66 66 #include <ipc/ipc.h> 67 #include <debug.h> 68 #include <string.h> 67 69 68 70 #ifdef CONFIG_SMP … … 78 80 static char alive[ALIVE_CHARS] = "-\\|/"; 79 81 #endif 82 83 #define BOOT_PREFIX "boot:" 84 #define BOOT_PREFIX_LEN 5 80 85 81 86 /** Kernel initialization thread. … … 176 181 } 177 182 178 char *name = init.tasks[i].name; 179 if (name[0] == '\0') name = "init-bin"; 183 /* 184 * Construct task name from the 'boot:' prefix and the 185 * name stored in the init structure (if any). 186 */ 187 188 char namebuf[TASK_NAME_BUFLEN], *name; 189 190 name = init.tasks[i].name; 191 if (name[0] == '\0') name = "<unknown>"; 192 193 ASSERT(TASK_NAME_BUFLEN >= BOOT_PREFIX_LEN); 194 strncpy(namebuf, BOOT_PREFIX, TASK_NAME_BUFLEN); 195 strncpy(namebuf + BOOT_PREFIX_LEN, name, 196 TASK_NAME_BUFLEN - BOOT_PREFIX_LEN); 180 197 181 198 int rc = program_create_from_image((void *) init.tasks[i].addr, 182 name , &programs[i]);199 namebuf, &programs[i]); 183 200 184 201 if ((rc == 0) && (programs[i].task != NULL)) {
Note:
See TracChangeset
for help on using the changeset viewer.