mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-26 22:38:51 +00:00
Start working on virtual consoles/TTYs.
This is a mess right now, but I'd rather commit as I go.
This commit is contained in:
parent
bd2b5327d0
commit
68739dc43e
Notes:
sideshowbarker
2024-07-19 18:36:32 +09:00
Author: https://github.com/awesomekling
Commit: 68739dc43e
22 changed files with 611 additions and 344 deletions
|
@ -5,15 +5,11 @@
|
|||
#include <AK/kmalloc.h>
|
||||
#include <AK/kstdio.h>
|
||||
#include <AK/ktime.h>
|
||||
#include "CharacterDevice.h"
|
||||
#include "sys-errno.h"
|
||||
|
||||
//#define VFS_DEBUG
|
||||
|
||||
static dword encodedDevice(unsigned major, unsigned minor)
|
||||
{
|
||||
return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
|
||||
}
|
||||
|
||||
static VirtualFileSystem* s_the;
|
||||
|
||||
VirtualFileSystem& VirtualFileSystem::the()
|
||||
|
@ -542,9 +538,9 @@ VirtualFileSystem::Mount::Mount(InodeIdentifier host, RetainPtr<FileSystem>&& gu
|
|||
{
|
||||
}
|
||||
|
||||
void VirtualFileSystem::registerCharacterDevice(unsigned major, unsigned minor, CharacterDevice& device)
|
||||
void VirtualFileSystem::registerCharacterDevice(CharacterDevice& device)
|
||||
{
|
||||
m_characterDevices.set(encodedDevice(major, minor), &device);
|
||||
m_characterDevices.set(encodedDevice(device.major(), device.minor()), &device);
|
||||
}
|
||||
|
||||
void VirtualFileSystem::forEachMount(Function<void(const Mount&)> callback) const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue