Implemented getting bootargs from OF. Untested.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32081 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
François Revol 2009-08-03 15:12:24 +00:00
parent b9ee6b3700
commit 696e647c0f

View File

@ -132,6 +132,8 @@ _start(uint32 _unused1, uint32 _unused3, void *openFirmwareEntry)
void
start(void *openFirmwareEntry)
{
char bootargs[512];
// stage2 args - might be set via the command line one day
stage2_args args;
args.heap_size = HEAP_SIZE;
@ -139,6 +141,13 @@ start(void *openFirmwareEntry)
of_init(openFirmwareEntry);
// check for arguments
if (of_getprop(gChosen, "bootargs", bootargs, sizeof(bootargs)) != OF_FAILED) {
static const char *sArgs[] = { NULL, NULL };
sArgs[0] = (const char *)bootargs;
args.arguments = sArgs;
}
determine_machine();
console_init();