summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-08-18 18:02:25 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-18 18:26:54 +0200
commit71e855474094c806ca099f1a8b61a07182ace90a (patch)
tree46c285235a62b5f8f03ba906f9114f706c540e20 /Kernel
parent6ad2d31952db5d4b06157deec0d19250d35992e8 (diff)
downloadserenity-71e855474094c806ca099f1a8b61a07182ace90a.zip
Kernel: Remove the now-unused FS::DirectoryEntry
This object was cumbersome and annoying (mostly due to its manually managed, statically sized name buffer.) And now we no longer need it!
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/FileSystem/FileSystem.cpp20
-rw-r--r--Kernel/FileSystem/FileSystem.h10
2 files changed, 0 insertions, 30 deletions
diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp
index 20952c2deb..e4ed6fd98b 100644
--- a/Kernel/FileSystem/FileSystem.cpp
+++ b/Kernel/FileSystem/FileSystem.cpp
@@ -65,26 +65,6 @@ FS* FS::from_fsid(u32 id)
return nullptr;
}
-FS::DirectoryEntry::DirectoryEntry(const char* n, InodeIdentifier i, u8 ft)
- : name_length(strlen(n))
- , inode(i)
- , file_type(ft)
-{
- ASSERT(name_length < (int)sizeof(name));
- memcpy(name, n, name_length);
- name[name_length] = '\0';
-}
-
-FS::DirectoryEntry::DirectoryEntry(const char* n, size_t nl, InodeIdentifier i, u8 ft)
- : name_length(nl)
- , inode(i)
- , file_type(ft)
-{
- ASSERT(name_length < (int)sizeof(name));
- memcpy(name, n, nl);
- name[nl] = '\0';
-}
-
FS::DirectoryEntryView::DirectoryEntryView(const StringView& n, InodeIdentifier i, u8 ft)
: name(n)
, inode(i)
diff --git a/Kernel/FileSystem/FileSystem.h b/Kernel/FileSystem/FileSystem.h
index 6e634c14b9..0cdd6d2b5c 100644
--- a/Kernel/FileSystem/FileSystem.h
+++ b/Kernel/FileSystem/FileSystem.h
@@ -69,16 +69,6 @@ public:
virtual KResult prepare_to_unmount() const { return KSuccess; }
- // FIXME: This data structure is very clunky and unpleasant. Replace it with something nicer.
- struct DirectoryEntry {
- DirectoryEntry(const char* name, InodeIdentifier, u8 file_type);
- DirectoryEntry(const char* name, size_t name_length, InodeIdentifier, u8 file_type);
- char name[256];
- size_t name_length { 0 };
- InodeIdentifier inode;
- u8 file_type { 0 };
- };
-
struct DirectoryEntryView {
DirectoryEntryView(const StringView& name, InodeIdentifier, u8 file_type);