Differences From Artifact [a8282db34a]:
- File mod/kcore/boot.rt.c — part of check-in [927371b674] at 2019-10-31 03:44:25 on branch trunk — add usage display for parameters and command line switches for kcli_set, the structure used to define command line syntax for the parser; add more string & buffer functions (user: lexi, size: 1259) [annotate] [blame] [check-ins using]
To Artifact [298efe4468]:
- File mod/kcore/boot.rt.c — part of check-in [62fd1bfe97] at 2020-01-05 17:52:15 on branch trunk — Fix _start to properly find the environment. The arguments and environment are directly on the initial stack, which means that more work is needed to find the start of the environment properly. Also remove the hack in _boot that made it work if there were no arguments, as all of the math is being done in _start now. (user: glowpelt, size: 1097) [annotate] [blame] [check-ins using]
7 7 unsigned long long 8 8 _boot(unsigned int argc, /* argument count */ 9 9 const char** argv, /* arguments */ 10 10 char** envp /* environment */ ) { 11 11 12 12 _k_internal_binary_name = argv[0]; 13 13 14 - envp ++; /* envp seems to point at a leading null; 15 - this is probably a sign of breakage but 16 - i don't know what else to do about it for 17 - the moment. */ 18 - 19 14 char** ep; 20 15 /* advance ep until it points at the last element */ 21 16 for (ep = envp; *ep != 0; ++ep); 22 17 23 18 /* allocate space for each environment variable */ 24 19 kvar variables [ep - envp]; 25 20