Now checks the kernel args structure size and version, and bails out if

it's not known (it currently only support the current version, of course :-).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7989 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-06-15 16:57:13 +00:00
parent 201b3e6fd1
commit f24066f694

View File

@ -58,6 +58,11 @@ _start(kernel_args *oldka, int cpu_num)
{
kernel_startup = true;
if (oldka->kernel_args_size != sizeof(kernel_args)
|| oldka->version != CURRENT_KERNEL_ARGS_VERSION)
// ToDo: there is no debug output yet...
return -1;
memcpy(&ka, oldka, sizeof(kernel_args));
// the passed in kernel args are in a non-allocated range of memory