Kernel - TODO: Kernel-mode shell
authorJohn Hodge <[email protected]>
Sun, 15 Feb 2015 04:59:33 +0000 (12:59 +0800)
committerJohn Hodge <[email protected]>
Sun, 15 Feb 2015 04:59:33 +0000 (12:59 +0800)
KernelLand/Kernel/system.c

index 748c744..9eac825 100644 (file)
@@ -22,6 +22,7 @@ void  System_ExecuteCommandLine(void);
 void   System_ParseVFS(char *Arg);
 void   System_ParseModuleArgs(char *Arg);
 void   System_ParseSetting(char *Arg);
+void   System_EmergencyConsole(void);
 
 // === GLOBALS ===
 const char     *gsInitBinary = "/Acess/SBin/init";
@@ -41,6 +42,7 @@ void System_Init(char *CommandLine)
        Modules_LoadBuiltins();
        Arch_LoadBootModules();
        
+       Log_Log("Config", "Running command line '%s", CommandLine);
        System_ExecuteCommandLine();
        
        // - Execute the Config Script
@@ -52,6 +54,9 @@ void System_Init(char *CommandLine)
                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);
+               
+               System_EmergencyConsole();
+               
                Log_KernelPanic("System", "Unable to spawn init '%s'", gsInitBinary);
        }
        
@@ -274,3 +279,7 @@ void System_ParseSetting(char *Arg)
        }
 }
 
+void System_EmergencyConsole(void)
+{
+       // TODO: Support an emergency kernel-land console (with FS viewing support)
+}

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