Subversion Repositories HelenOS

Rev

Rev 4014 | Rev 4220 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4014 Rev 4020
Line 78... Line 78...
78
 
78
 
79
#ifdef CONFIG_KCONSOLE
79
#ifdef CONFIG_KCONSOLE
80
static char alive[ALIVE_CHARS] = "-\\|/";
80
static char alive[ALIVE_CHARS] = "-\\|/";
81
#endif
81
#endif
82
 
82
 
83
#define BOOT_PREFIX      "boot:"
83
#define INIT_PREFIX      "init:"
84
#define BOOT_PREFIX_LEN  5
84
#define INIT_PREFIX_LEN  5
85
 
85
 
86
/** Kernel initialization thread.
86
/** Kernel initialization thread.
87
 *
87
 *
88
 * kinit takes care of higher level kernel
88
 * kinit takes care of higher level kernel
89
 * initialization (i.e. thread creation,
89
 * initialization (i.e. thread creation,
Line 176... Line 176...
176
            printf("init[%" PRIc "].addr is not frame aligned\n", i);
176
            printf("init[%" PRIc "].addr is not frame aligned\n", i);
177
            continue;
177
            continue;
178
        }
178
        }
179
       
179
       
180
        /*
180
        /*
181
         * Construct task name from the 'boot:' prefix and the
181
         * Construct task name from the 'init:' prefix and the
182
         * name stored in the init structure (if any).
182
         * name stored in the init structure (if any).
183
         */
183
         */
184
       
184
       
185
        char namebuf[TASK_NAME_BUFLEN];
185
        char namebuf[TASK_NAME_BUFLEN];
186
        char *name;
186
        char *name;
187
       
187
       
188
        name = init.tasks[i].name;
188
        name = init.tasks[i].name;
189
        if (name[0] == '\0')
189
        if (name[0] == '\0')
190
            name = "<unknown>";
190
            name = "<unknown>";
191
       
191
       
192
        ASSERT(TASK_NAME_BUFLEN >= BOOT_PREFIX_LEN);
192
        ASSERT(TASK_NAME_BUFLEN >= INIT_PREFIX_LEN);
193
        strncpy(namebuf, BOOT_PREFIX, TASK_NAME_BUFLEN);
193
        strncpy(namebuf, INIT_PREFIX, TASK_NAME_BUFLEN);
194
        strncpy(namebuf + BOOT_PREFIX_LEN, name,
194
        strncpy(namebuf + INIT_PREFIX_LEN, name,
195
            TASK_NAME_BUFLEN - BOOT_PREFIX_LEN);
195
            TASK_NAME_BUFLEN - INIT_PREFIX_LEN);
196
       
196
       
197
        int rc = program_create_from_image((void *) init.tasks[i].addr,
197
        int rc = program_create_from_image((void *) init.tasks[i].addr,
198
            namebuf, &programs[i]);
198
            namebuf, &programs[i]);
199
       
199
       
200
        if ((rc == 0) && (programs[i].task != NULL)) {
200
        if ((rc == 0) && (programs[i].task != NULL)) {