1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 01:45:07 +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:
Andreas Kling 2018-10-30 13:59:29 +01:00
parent bd2b5327d0
commit 68739dc43e
22 changed files with 611 additions and 344 deletions

View file

@ -22,6 +22,11 @@
class CharacterDevice;
class FileHandle;
inline constexpr dword encodedDevice(unsigned major, unsigned minor)
{
return (minor & 0xff) | (major << 8) | ((minor & ~0xff) << 12);
}
class VirtualFileSystem {
public:
static void initializeGlobals();
@ -94,7 +99,7 @@ public:
bool touch(const String&path);
void registerCharacterDevice(unsigned major, unsigned minor, CharacterDevice&);
void registerCharacterDevice(CharacterDevice&);
size_t mountCount() const { return m_mounts.size(); }
void forEachMount(Function<void(const Mount&)>) const;