The kernel provides the $cputype environmental variable.

This commit is contained in:
Jonas 'Sortie' Termansen 2012-04-14 15:31:39 +02:00
parent e230854ee9
commit 8f3fd73bd6
1 changed files with 10 additions and 2 deletions

View File

@ -370,8 +370,16 @@ static void InitThread(void* /*user*/)
int argc = 1;
const char* argv[] = { "init", NULL };
int envc = 0;
const char* envp[] = { NULL };
#if defined(PLATFORM_X86)
const char* cputype = "cputype=i486-pc-sortix";
#elif defined(PLATFORM_X64)
const char* cputype = "cputype=x86_64-pc-sortix";
#else
#warning No cputype environmental variable provided here.
const char* cputype = "cputype=unknown-pc-sortix";
#endif
int envc = 1;
const char* envp[] = { cputype, NULL };
CPU::InterruptRegisters regs;
if ( process->Execute("init", program, programsize, argc, argv, envc, envp,