Kernel: Make BochsVGADevice a BlockDevice and support mmapping it.

Currently you can only mmap the entire framebuffer.
Using this when starting up the WindowServer gets us yet another step
closer towards it moving into userspace. :^)
This commit is contained in:
Andreas Kling 2019-02-16 09:57:42 +01:00
commit 799177feda
Notes: sideshowbarker 2024-07-19 15:42:11 +09:00
15 changed files with 155 additions and 26 deletions

View file

@ -145,7 +145,7 @@ RetainPtr<FileDescriptor> VFS::open(const String& path, int& error, int options,
if (!inode)
return nullptr;
auto metadata = inode->metadata();
if (!(options & O_DONT_OPEN_DEVICE) && metadata.is_character_device()) {
if (!(options & O_DONT_OPEN_DEVICE) && metadata.is_device()) {
auto it = m_devices.find(encoded_device(metadata.major_device, metadata.minor_device));
if (it == m_devices.end()) {
kprintf("VFS::open: no such device %u,%u\n", metadata.major_device, metadata.minor_device);