Kernel: Rewrite whole device structure

We now have DevFileSystem which is derived from RamFileSystem. All
devices are RamInodes. We don't have separate DeviceManager anymore.
To iterate over devices, you can loop througn every inode in devfs.
This commit is contained in:
2023-07-10 23:17:14 +03:00
parent 9174a89971
commit 74c79c7eff
34 changed files with 334 additions and 408 deletions

View File

@@ -11,6 +11,7 @@
#include <fcntl.h>
#include <stdio.h>
#include <sys/sysmacros.h>
namespace Kernel
{
@@ -749,8 +750,9 @@ namespace Kernel
LockGuard _(m_lock);
if (m_tty == nullptr)
buffer[0] = '\0';
strcpy(buffer, "/dev/");
strcpy(buffer + 5, m_tty->name().data());
ASSERT(minor(m_tty->rdev()) < 10);
strcpy(buffer, "/dev/tty1");
buffer[8] += minor(m_tty->rdev());
return 0;
}