Changeset 0f94c3d in mainline for kernel/arch/ia32/src/boot/cboot.c


Ignore:
Timestamp:
2009-03-01T20:51:26Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2e079b70
Parents:
0d5a50c
Message:

Read command line for multiboot modules on ia32 and copy it to task name. Other arches will need to initialize task names in the init structure to an empty string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia32/src/boot/cboot.c

    r0d5a50c r0f94c3d  
    3939#include <config.h>
    4040#include <memstr.h>
     41#include <func.h>
    4142
    4243/* This is a symbol so the type is only dummy. Obtain the value using &. */
     
    6970                        init.tasks[i].addr = mods[i].start + 0x80000000;
    7071                        init.tasks[i].size = mods[i].end - mods[i].start;
     72
     73                        /* Copy command line, if available. */
     74                        if (mods[i].string) {
     75                                strncpy(init.tasks[i].name, mods[i].string,
     76                                    CONFIG_TASK_NAME_BUFLEN - 1);
     77                                init.tasks[i].name[CONFIG_TASK_NAME_BUFLEN - 1]
     78                                    = '\0';
     79                        } else {
     80                                init.tasks[i].name[0] = '\0';
     81                        }
    7182                }
    7283        } else {
Note: See TracChangeset for help on using the changeset viewer.