mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 05:08: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
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;
|
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)
|
Vector<Ext2FS::BlockIndex> Ext2FS::allocate_blocks(unsigned group, unsigned count)
|
||||||
{
|
{
|
||||||
dbgprintf("Ext2FS: allocateBlocks(group: %u, count: %u)\n", group, 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)
|
InodeIdentifier Ext2FS::create_directory(InodeIdentifier parentInode, const String& name, Unix::mode_t mode, int& error)
|
||||||
{
|
{
|
||||||
ASSERT(parentInode.fsid() == id());
|
ASSERT(parentInode.fsid() == id());
|
||||||
ASSERT(is_directory_inode(parentInode.index()));
|
|
||||||
|
|
||||||
// Fix up the mode to definitely be a directory.
|
// Fix up the mode to definitely be a directory.
|
||||||
// FIXME: This is a bit on the hackish side.
|
// 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)
|
InodeIdentifier Ext2FS::create_inode(InodeIdentifier parentInode, const String& name, Unix::mode_t mode, unsigned size, int& error)
|
||||||
{
|
{
|
||||||
ASSERT(parentInode.fsid() == id());
|
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());
|
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 InodeIdentifier find_parent_of_inode(InodeIdentifier) const override;
|
||||||
virtual RetainPtr<Inode> get_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);
|
unsigned allocate_inode(unsigned preferredGroup, unsigned expectedSize);
|
||||||
Vector<BlockIndex> allocate_blocks(unsigned group, unsigned count);
|
Vector<BlockIndex> allocate_blocks(unsigned group, unsigned count);
|
||||||
unsigned group_index_from_inode(unsigned) const;
|
unsigned group_index_from_inode(unsigned) const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue