mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 03:07:43 +00:00
Kernel: Rename FileDescription => OpenFileDescription
Dr. POSIX really calls these "open file description", not just "file description", so let's call them exactly that. :^)
This commit is contained in:
parent
dbd639a2d8
commit
4a9c18afb9
135 changed files with 680 additions and 680 deletions
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/FileSystem/FileDescription.h>
|
||||
#include <Kernel/FileSystem/OpenFileDescription.h>
|
||||
#include <Kernel/Storage/Partition/DiskPartition.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -37,28 +37,28 @@ void DiskPartition::start_request(AsyncBlockDeviceRequest& request)
|
|||
request.block_index() + m_metadata.start_block(), request.block_count(), request.buffer(), request.buffer_size()));
|
||||
}
|
||||
|
||||
KResultOr<size_t> DiskPartition::read(FileDescription& fd, u64 offset, UserOrKernelBuffer& outbuf, size_t len)
|
||||
KResultOr<size_t> DiskPartition::read(OpenFileDescription& fd, u64 offset, UserOrKernelBuffer& outbuf, size_t len)
|
||||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
dbgln_if(OFFD_DEBUG, "DiskPartition::read offset={}, adjust={}, len={}", fd.offset(), adjust, len);
|
||||
return m_device->read(fd, offset + adjust, outbuf, len);
|
||||
}
|
||||
|
||||
bool DiskPartition::can_read(const FileDescription& fd, size_t offset) const
|
||||
bool DiskPartition::can_read(const OpenFileDescription& fd, size_t offset) const
|
||||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
dbgln_if(OFFD_DEBUG, "DiskPartition::can_read offset={}, adjust={}", offset, adjust);
|
||||
return m_device->can_read(fd, offset + adjust);
|
||||
}
|
||||
|
||||
KResultOr<size_t> DiskPartition::write(FileDescription& fd, u64 offset, const UserOrKernelBuffer& inbuf, size_t len)
|
||||
KResultOr<size_t> DiskPartition::write(OpenFileDescription& fd, u64 offset, const UserOrKernelBuffer& inbuf, size_t len)
|
||||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
dbgln_if(OFFD_DEBUG, "DiskPartition::write offset={}, adjust={}, len={}", offset, adjust, len);
|
||||
return m_device->write(fd, offset + adjust, inbuf, len);
|
||||
}
|
||||
|
||||
bool DiskPartition::can_write(const FileDescription& fd, size_t offset) const
|
||||
bool DiskPartition::can_write(const OpenFileDescription& fd, size_t offset) const
|
||||
{
|
||||
unsigned adjust = m_metadata.start_block() * block_size();
|
||||
dbgln_if(OFFD_DEBUG, "DiskPartition::can_write offset={}, adjust={}", offset, adjust);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue