* system.c
* - Architecture Independent System Init
*/
-#define DEBUG 0
+#define DEBUG 1
#include <acess.h>
#include <hal_proc.h>
if(Proc_Clone(CLONE_VM|CLONE_NOUSER) == 0)
{
const char *args[] = {gsInitBinary, 0};
+ VFS_Open("/Devices/pts/vt0c", VFS_OPENFLAG_READ|VFS_OPENFLAG_USER); // 0: stdin
+ VFS_Open("/Devices/pts/vt0c", VFS_OPENFLAG_WRITE|VFS_OPENFLAG_USER); // 1: stdout
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/vt7c");
}
/**
// - Symbolic Link <link>=<destination>
if(value[0] == '/')
{
- Log_Log("Config", "Symbolic link '%s' pointing to '%s'", Arg, value);
+// Log_Log("Config", "Symbolic link '%s' pointing to '%s'", Arg, value);
VFS_Symlink(Arg, value);
}
// - Mount <mountpoint>=<fs>:<device>
}
// Create Mountpoint
if( (fd = VFS_Open(Arg, 0)) == -1 ) {
- Log_Log("Config", "Creating directory '%s'", Arg, value);
+// Log_Log("Config", "Creating directory '%s'", Arg, value);
VFS_MkDir( Arg );
} else {
VFS_Close(fd);
}
// Mount
- Log_Log("Config", "Mounting '%s' to '%s' ('%s')", dev, Arg, value);
+// Log_Log("Config", "Mounting '%s' to '%s' ('%s')", dev, Arg, value);
VFS_Mount(dev, Arg, value, "");
}
}