summaryrefslogtreecommitdiff
path: root/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-09-13 19:41:13 +0200
committerAlexis211 <alexis211@gmail.com>2009-09-13 19:41:13 +0200
commite0d27cc75009e27502d57258cb64c71221b4b7d1 (patch)
tree0898ab1a033d27fbd527b636b70a3805ea97ea13 /Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
parentd25429b738cb9c1b34d234ae23b3af27fdff72ea (diff)
downloadMelon-e0d27cc75009e27502d57258cb64c71221b4b7d1.tar.gz
Melon-e0d27cc75009e27502d57258cb64c71221b4b7d1.zip
Class for file descriptors introduced : File. Not used yet.
Diffstat (limited to 'Source/Kernel/FileSystems/RamFS/RamFS.class.cpp')
-rw-r--r--Source/Kernel/FileSystems/RamFS/RamFS.class.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp b/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
index 7e29e08..c5d0656 100644
--- a/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
+++ b/Source/Kernel/FileSystems/RamFS/RamFS.class.cpp
@@ -140,4 +140,10 @@ DirectoryNode* RamFS::createDirectory(DirectoryNode* parent, String name) {
return d;
}
-bool RamFS::remove(DirectoryNode* parent, FSNode* node) { return true; }
+bool RamFS::remove(DirectoryNode* parent, FSNode* node) {
+ if (node->type() == NT_FILE) {
+ u8int *d = ((RamFileNode*)node)->m_data;
+ if (d != 0) Mem::kfree(d);
+ }
+ return true;
+}