X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Fsystem.c;h=0c701c33cff61b57a5221bc2ed19d49b8ffac2b2;hb=5ee801f4fb22bba3298f10273027e67f53692e4c;hp=9224db5507530383ee8766bdd78091198c2ae778;hpb=d0b4559f2936f6d9f06be0f7c3c51527a480ec0d;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/system.c b/KernelLand/Kernel/system.c index 9224db55..0c701c33 100644 --- a/KernelLand/Kernel/system.c +++ b/KernelLand/Kernel/system.c @@ -48,13 +48,16 @@ void System_Init(char *CommandLine) if(Proc_Clone(CLONE_VM|CLONE_NOUSER) == 0) { const char *args[] = {gsInitBinary, 0}; + VFS_Open("/Devices/pts/vt0", VFS_OPENFLAG_READ|VFS_OPENFLAG_USER); // 0: stdin + VFS_Open("/Devices/pts/vt0", VFS_OPENFLAG_WRITE|VFS_OPENFLAG_USER); // 1: stdout + VFS_DuplicateFD(1, 2); // 2: stderr Proc_Execve(gsInitBinary, args, &args[1], 0); Log_KernelPanic("System", "Unable to spawn init '%s'", gsInitBinary); } // Set the debug to be echoed to the terminal Log_Log("Config", "Kernel now echoes to VT7 (Ctrl-Alt-F8)"); - Debug_SetKTerminal("/Devices/VTerm/7"); + Debug_SetKTerminal("/Devices/pts/vt7"); } /** @@ -75,7 +78,10 @@ void System_ParseCommandLine(char *ArgString) // Eat Whitespace while(*str == ' ') str++; // Check for the end of the string - if(*str == '\0') { argc--; break;} + if(*str == '\0') { + argc--; + break; + } argv[argc] = str; if(*str == '"') { while(*str && !(*str == '"' && str[-1] != '\\'))