mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 19:04:58 +00:00
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:
@@ -358,11 +358,16 @@ InodeMetadata Ext2FSInode::metadata() const
|
||||
metadata.block_size = fs().block_size();
|
||||
metadata.block_count = m_raw_inode.i_blocks;
|
||||
|
||||
if (::is_block_device(m_raw_inode.i_mode) || ::is_character_device(m_raw_inode.i_mode)) {
|
||||
if (::is_character_device(m_raw_inode.i_mode)) {
|
||||
unsigned dev = m_raw_inode.i_block[0];
|
||||
metadata.major_device = (dev & 0xfff00) >> 8;
|
||||
metadata.minor_device = (dev & 0xff) | ((dev >> 12) & 0xfff00);
|
||||
}
|
||||
if (::is_block_device(m_raw_inode.i_mode)) {
|
||||
unsigned dev = m_raw_inode.i_block[1];
|
||||
metadata.major_device = (dev & 0xfff00) >> 8;
|
||||
metadata.minor_device = (dev & 0xff) | ((dev >> 12) & 0xfff00);
|
||||
}
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user