summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2019-08-17 12:33:39 +0300
committerAndreas Kling <awesomekling@gmail.com>2019-08-17 12:07:55 +0200
commit6778abb99950efaea21bdd220a18129f575598c3 (patch)
treed77abd9c473ec3f53545b0bafd401b5c9b4f725c /Kernel
parentf95c264f1756a4ce6b11a01c912a2ca036d21412 (diff)
downloadserenity-6778abb99950efaea21bdd220a18129f575598c3.zip
Kernel+SystemServer: Mount filesystems and start TTYServer in userspace
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/init.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 650cbb8992..1cfa0157fd 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -118,20 +118,6 @@ VFS* vfs;
load_ksyms();
dbgprintf("Loaded ksyms\n");
- // TODO: we should mount these from SystemServer
- auto procfs = ProcFS::create();
- procfs->initialize();
- vfs->mount(procfs, "/proc");
-
- auto devptsfs = DevPtsFS::create();
- devptsfs->initialize();
- vfs->mount(devptsfs, "/dev/pts");
-
- auto tmpfs = TmpFS::create();
- if (!tmpfs->initialize())
- ASSERT_NOT_REACHED();
- vfs->mount(move(tmpfs), "/tmp");
-
// Now, detect whether or not there are actually any floppy disks attached to the system
u8 detect = CMOS::read(0x10);
RefPtr<FloppyDiskDevice> fd0;
@@ -152,34 +138,13 @@ VFS* vfs;
int error;
- auto* system_server_process = Process::create_user_process("/bin/SystemServer", (uid_t)100, (gid_t)100, (pid_t)0, error, {}, {}, tty0);
+ auto* system_server_process = Process::create_user_process("/bin/SystemServer", (uid_t)0, (gid_t)0, (pid_t)0, error, {}, {}, tty0);
if (error != 0) {
kprintf("init_stage2: error spawning SystemServer: %d\n", error);
hang();
}
system_server_process->set_priority(Process::HighPriority);
- auto* tty1_process = Process::create_user_process("/bin/TTYServer", (uid_t)0, (gid_t)0, (pid_t)0, error, { "/bin/TTYServer", "tty1" }, {}, tty1);
- if (error != 0) {
- kprintf("init_stage2: error spawning TTYServer for tty1: %d\n", error);
- hang();
- }
- tty1_process->set_priority(Process::HighPriority);
-
- auto* tty2_process = Process::create_user_process("/bin/TTYServer", (uid_t)0, (gid_t)0, (pid_t)0, error, { "/bin/TTYServer", "tty2" }, {}, tty2);
- if (error != 0) {
- kprintf("init_stage2: error spawning TTYServer for tty2: %d\n", error);
- hang();
- }
- tty2_process->set_priority(Process::HighPriority);
-
- auto* tty3_process = Process::create_user_process("/bin/TTYServer", (uid_t)0, (gid_t)0, (pid_t)0, error, { "/bin/TTYServer", "tty3" }, {}, tty3);
- if (error != 0) {
- kprintf("init_stage2: error spawning TTYServer for tty3: %d\n", error);
- hang();
- }
- tty3_process->set_priority(Process::HighPriority);
-
current->process().sys$exit(0);
ASSERT_NOT_REACHED();
}