From aa714afa18cc1000431101401d063378cef253f1 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Sun, 27 Dec 2009 12:04:09 +0100 Subject: Bugfixes with mountpoints --- CopyToHDD.sh | 3 +-- Grub-menu-hdd.cfg | 4 ---- Melon.img | Bin 1474560 -> 1474560 bytes Source/Kernel/VFS/DirectoryNode.class.cpp | 7 ++++++- Source/Kernel/VFS/DirectoryNode.class.h | 1 + Source/Kernel/VFS/FSNode.proto.h | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CopyToHDD.sh b/CopyToHDD.sh index 8c56e6b..27e497e 100755 --- a/CopyToHDD.sh +++ b/CopyToHDD.sh @@ -15,9 +15,8 @@ mkdir Mount/Volumes/{Floppy,InitRFS} # Copy welcome text cp Source/Kernel/Ressources/Texts/Welcome.txt Mount -# Copy kernel and initramfs +# Copy kernel cp Source/Kernel/Melon.ke Mount/System -cp Init.rfs Mount/System # Copy system ressources cp Source/Kernel/Ressources/Configuration/* Mount/System/Configuration diff --git a/Grub-menu-hdd.cfg b/Grub-menu-hdd.cfg index d3468b0..3535da1 100644 --- a/Grub-menu-hdd.cfg +++ b/Grub-menu-hdd.cfg @@ -3,20 +3,16 @@ default 2 title The Melon Operating System root (hd0,0) kernel /System/Melon.ke root:block.ata:0:1 -module /System/Init.rfs title Melon without VESA root (hd0,0) kernel /System/Melon.ke vesa:disabled root:block.ata:0:1 -module /System/Init.rfs title Melon without init root (hd0,0) kernel /System/Melon.ke init: root:block.ata:0:1 -module /System/Init.rfs title Game of life simulator root (hd0,0) kernel /System/Melon.ke init:/Applications/Demos/GOL.app root:block.ata:0:1 -module /System/Init.rfs diff --git a/Melon.img b/Melon.img index d273e1f..221a056 100644 Binary files a/Melon.img and b/Melon.img differ diff --git a/Source/Kernel/VFS/DirectoryNode.class.cpp b/Source/Kernel/VFS/DirectoryNode.class.cpp index 55365f0..18bc41a 100644 --- a/Source/Kernel/VFS/DirectoryNode.class.cpp +++ b/Source/Kernel/VFS/DirectoryNode.class.cpp @@ -30,6 +30,11 @@ u32int DirectoryNode::getNameChildSC(u32int name) { return (u32int) - 1; } +const String& DirectoryNode::getName() { + if (m_name == "/" && m_parent != NULL) return m_parent->getName(); + return m_name; +} + u64int DirectoryNode::getLength() { if (m_mounts != 0) return m_mounts->getLength(); if (!m_contentLoaded) @@ -39,7 +44,7 @@ u64int DirectoryNode::getLength() { } FSNode* DirectoryNode::getParent() { - //if (m_name == "/" and m_parent != 0) return m_parent->getParent(); + if (m_name == "/" and m_parent != 0) return m_parent->getParent(); return m_parent; } diff --git a/Source/Kernel/VFS/DirectoryNode.class.h b/Source/Kernel/VFS/DirectoryNode.class.h index 1fc4c52..ded9af8 100644 --- a/Source/Kernel/VFS/DirectoryNode.class.h +++ b/Source/Kernel/VFS/DirectoryNode.class.h @@ -27,6 +27,7 @@ class DirectoryNode : public FSNode { Vector &getChildren() { return m_children; } //MUST BE USED ONLY BY FILESYSTEMS u8int type() { return NT_DIRECTORY; } + const String& getName(); u64int getLength(); FSNode* getParent(); bool removable(); diff --git a/Source/Kernel/VFS/FSNode.proto.h b/Source/Kernel/VFS/FSNode.proto.h index a46c79d..3e5c5a7 100644 --- a/Source/Kernel/VFS/FSNode.proto.h +++ b/Source/Kernel/VFS/FSNode.proto.h @@ -43,7 +43,7 @@ class FSNode : public Ressource { virtual bool removable() = 0; //True for files, false for non-empty directories, true otherwise virtual bool used() { return false; } //True if file is read/written from/to - const String& getName() { return m_name; } + virtual const String& getName() { return m_name; } virtual u64int getLength() { return m_length; } u32int getPermissions() { return m_permissions; } u32int getUid() { return m_uid; } -- cgit v1.2.3