7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
unsigned long long
_boot(unsigned int argc, /* argument count */
const char** argv, /* arguments */
char** envp /* environment */ ) {
_k_internal_binary_name = argv[0];
envp ++; /* envp seems to point at a leading null;
this is probably a sign of breakage but
i don't know what else to do about it for
the moment. */
char** ep;
/* advance ep until it points at the last element */
for (ep = envp; *ep != 0; ++ep);
/* allocate space for each environment variable */
kvar variables [ep - envp];
|
|
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
unsigned long long
_boot(unsigned int argc, /* argument count */
const char** argv, /* arguments */
char** envp /* environment */ ) {
_k_internal_binary_name = argv[0];
char** ep;
/* advance ep until it points at the last element */
for (ep = envp; *ep != 0; ++ep);
/* allocate space for each environment variable */
kvar variables [ep - envp];
|