Kernel - Opened stdin/stdout on VT0 for init
authorJohn Hodge (sonata) <[email protected]>
Sat, 19 Jan 2013 11:31:03 +0000 (19:31 +0800)
committerJohn Hodge (sonata) <[email protected]>
Sat, 19 Jan 2013 11:31:03 +0000 (19:31 +0800)
KernelLand/Kernel/system.c

index 9224db5..7938723 100644 (file)
@@ -48,6 +48,8 @@ void System_Init(char *CommandLine)
        if(Proc_Clone(CLONE_VM|CLONE_NOUSER) == 0)
        {
                const char      *args[] = {gsInitBinary, 0};
+               VFS_Open("/Devices/VTerm/0", VFS_OPENFLAG_READ|VFS_OPENFLAG_USER);      // 0: stdin
+               VFS_Open("/Devices/VTerm/0", VFS_OPENFLAG_WRITE|VFS_OPENFLAG_USER);     // 1: stdout
                Proc_Execve(gsInitBinary, args, &args[1], 0);
                Log_KernelPanic("System", "Unable to spawn init '%s'", gsInitBinary);
        }

UCC git Repository :: git.ucc.asn.au