summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-06-09 12:48:34 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-06-09 12:48:34 +0200
commit7562c0b7bf0343d14e3da37b5d5e6e2d59c565af (patch)
treeed5161521d83098dfe38f873b9e186a74b117345 /Kernel/FileSystem
parent6873e7d01628eb2e8a850b0caebfeb6c1fd373db (diff)
downloadserenity-7562c0b7bf0343d14e3da37b5d5e6e2d59c565af.zip
Ext2FS: Fix wrong file mode being passed from create_inode() to add_child().
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index c1c07963a9..fe2a1d726e 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -761,7 +761,7 @@ KResult Ext2FSInode::add_child(InodeIdentifier child_id, const StringView& name,
ASSERT(is_directory());
//#ifdef EXT2_DEBUG
- dbgprintf("Ext2FS: Adding inode %u with name '%s' to directory %u\n", child_id.index(), name.characters(), index());
+ dbgprintf("Ext2FS: Adding inode %u with name '%s' and mode %o to directory %u\n", child_id.index(), name.characters(), mode, index());
//#endif
Vector<FS::DirectoryEntry> entries;
@@ -1150,7 +1150,7 @@ RetainPtr<Inode> Ext2FS::create_inode(InodeIdentifier parent_id, const String& n
}
// Try adding it to the directory first, in case the name is already in use.
- auto result = parent_inode->add_child({ fsid(), inode_id }, name, to_ext2_file_type(mode));
+ auto result = parent_inode->add_child({ fsid(), inode_id }, name, mode);
if (result.is_error()) {
error = result;
return {};