mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 16:14:38 +00:00
Greatly improve /proc/PID/stack by tracing the ebp frame chain.
I also added a generator cache to FileHandle. This way, multiple reads to a generated file (i.e in a synthfs) can transparently handle multiple calls to read() without the contents changing between calls. The cache is discarded at EOF (or when the FileHandle is destroyed.)
This commit is contained in:
@@ -102,7 +102,7 @@ Unix::ssize_t FileHandle::read(byte* buffer, Unix::size_t count)
|
||||
// FIXME: What should happen to m_currentOffset?
|
||||
return m_vnode->characterDevice()->read(buffer, count);
|
||||
}
|
||||
Unix::ssize_t nread = m_vnode->fileSystem()->readInodeBytes(m_vnode->inode, m_currentOffset, count, buffer);
|
||||
Unix::ssize_t nread = m_vnode->fileSystem()->readInodeBytes(m_vnode->inode, m_currentOffset, count, buffer, this);
|
||||
m_currentOffset += nread;
|
||||
return nread;
|
||||
}
|
||||
@@ -125,7 +125,7 @@ ByteBuffer FileHandle::readEntireFile()
|
||||
return buffer;
|
||||
}
|
||||
|
||||
return m_vnode->fileSystem()->readEntireInode(m_vnode->inode);
|
||||
return m_vnode->fileSystem()->readEntireInode(m_vnode->inode, this);
|
||||
}
|
||||
|
||||
bool FileHandle::isDirectory() const
|
||||
|
||||
Reference in New Issue
Block a user