mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 04:25:13 +00:00
Get rid of Ext2FS::is_directory_inode().
This was only used for assertions and will be factored out in favor of Inode metadata checks eventually.
This commit is contained in:
parent
12a6963a5d
commit
1e07ead119
Notes:
sideshowbarker
2024-07-19 16:07:20 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/1e07ead119d
2 changed files with 0 additions and 10 deletions
|
@ -650,13 +650,6 @@ bool Ext2FS::write_ext2_inode(unsigned inode, const ext2_inode& e2inode)
|
|||
return true;
|
||||
}
|
||||
|
||||
bool Ext2FS::is_directory_inode(unsigned inode) const
|
||||
{
|
||||
if (auto e2inode = lookup_ext2_inode(inode))
|
||||
return isDirectory(e2inode->i_mode);
|
||||
return false;
|
||||
}
|
||||
|
||||
Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(unsigned group, unsigned count)
|
||||
{
|
||||
dbgprintf("Ext2FS: allocateBlocks(group: %u, count: %u)\n", group, count);
|
||||
|
@ -840,7 +833,6 @@ bool Ext2FS::set_block_allocation_state(GroupIndex group, BlockIndex bi, bool ne
|
|||
InodeIdentifier Ext2FS::create_directory(InodeIdentifier parentInode, const String& name, Unix::mode_t mode, int& error)
|
||||
{
|
||||
ASSERT(parentInode.fsid() == id());
|
||||
ASSERT(is_directory_inode(parentInode.index()));
|
||||
|
||||
// Fix up the mode to definitely be a directory.
|
||||
// FIXME: This is a bit on the hackish side.
|
||||
|
@ -880,7 +872,6 @@ InodeIdentifier Ext2FS::create_directory(InodeIdentifier parentInode, const Stri
|
|||
InodeIdentifier Ext2FS::create_inode(InodeIdentifier parentInode, const String& name, Unix::mode_t mode, unsigned size, int& error)
|
||||
{
|
||||
ASSERT(parentInode.fsid() == id());
|
||||
ASSERT(is_directory_inode(parentInode.index()));
|
||||
|
||||
dbgprintf("Ext2FS: Adding inode '%s' (mode %u) to parent directory %u:\n", name.characters(), mode, parentInode.index());
|
||||
|
||||
|
|
|
@ -77,7 +77,6 @@ private:
|
|||
virtual InodeIdentifier find_parent_of_inode(InodeIdentifier) const override;
|
||||
virtual RetainPtr<Inode> get_inode(InodeIdentifier) const override;
|
||||
|
||||
bool is_directory_inode(unsigned) const;
|
||||
unsigned allocate_inode(unsigned preferredGroup, unsigned expectedSize);
|
||||
Vector<BlockIndex> allocate_blocks(unsigned group, unsigned count);
|
||||
unsigned group_index_from_inode(unsigned) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue