Changeset 3b3faf51 in mainline


Ignore:
Timestamp:
2016-12-26T20:02:04Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba1ea40
Parents:
a79b42a
Message:

Add kernel global bargs to hold the boot arguments

Location:
kernel/generic
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/config.h

    ra79b42a r3b3faf51  
    4343
    4444#define STACK_SIZE_USER  (1 * 1024 * 1024)
     45
     46#define CONFIG_BOOT_ARGUMENTS_BUFLEN 256
    4547
    4648#define CONFIG_INIT_TASKS        32
     
    102104
    103105extern config_t config;
     106extern char bargs[];
    104107extern init_t init;
    105108extern ballocs_t ballocs;
  • kernel/generic/src/main/main.c

    ra79b42a r3b3faf51  
    117117};
    118118
     119/** Boot arguments. */
     120char bargs[CONFIG_BOOT_ARGUMENTS_BUFLEN] = {};
     121
    119122/** Initial user-space tasks */
    120123init_t init = {
     
    276279        thread_init();
    277280        futex_init();
    278        
     281
     282        sysinfo_set_item_data("boot_args", NULL, bargs, str_size(bargs) + 1);
     283
    279284        if (init.cnt > 0) {
    280285                size_t i;
Note: See TracChangeset for help on using the changeset viewer.