[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MiNT] booting and _mint_setenv



Hi Frank!

I've had quite big problems recently when updating my CVS tree.

I got stuck during the system boot in reading the mint.cnf and setting the initial environment using the 'setenv' directives. I noticed that Frank did something about this. I went to debug this and realized that mint.prg iherites its default process p_env pointer from TOS (IIRC) and therefore the total size of the base environment can't be longer that say 128 bytes. Also the CVSROOT/sys/init.c:_mint_setenv() uses the RAM_PAD() macro which definitely fails on pointers not allocated with the MiNT's internal alloc function.

I solved this for myself so that the _mint_setenv() actually allocs the environment when called for the first time. I assume this as a temporary hack and I think the mint.prg should allocate its own chunk (like any other process) and copy the environment from TOS into that. With that the _mint_setenv() doesn't need to be changed and would look fine. Frank?

regards

STan