summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-12-27 12:04:09 +0100
committerAlexis211 <alexis211@gmail.com>2009-12-27 12:04:09 +0100
commitaa714afa18cc1000431101401d063378cef253f1 (patch)
treec371a7a61a3afdc6ae2085c4d7e36efb8600c2a3
parente25dbc23d43258ad8f822bd3c5d202b51c492184 (diff)
downloadMelon-aa714afa18cc1000431101401d063378cef253f1.tar.gz
Melon-aa714afa18cc1000431101401d063378cef253f1.zip
Bugfixes with mountpoints
-rwxr-xr-xCopyToHDD.sh3
-rw-r--r--Grub-menu-hdd.cfg4
-rw-r--r--Melon.imgbin1474560 -> 1474560 bytes
-rw-r--r--Source/Kernel/VFS/DirectoryNode.class.cpp7
-rw-r--r--Source/Kernel/VFS/DirectoryNode.class.h1
-rw-r--r--Source/Kernel/VFS/FSNode.proto.h2
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
--- a/Melon.img
+++ b/Melon.img
Binary files 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<FSNode*> &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; }