summaryrefslogtreecommitdiff
path: root/Source/Kernel/Shell/KernelShell.class.h
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-02 22:51:28 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-02 22:51:28 +0200
commit92abedffec913fe7337117403c5e07185356c81b (patch)
tree1527937c1a1a7ab8168891f6465e198b88bbfea2 /Source/Kernel/Shell/KernelShell.class.h
parent021831ab981b9df22cd1ac5e5ac51f0f84ef49a7 (diff)
downloadMelon-92abedffec913fe7337117403c5e07185356c81b.tar.gz
Melon-92abedffec913fe7337117403c5e07185356c81b.zip
The kernel shell is now in an independent class, KernelShell::
Diffstat (limited to 'Source/Kernel/Shell/KernelShell.class.h')
-rw-r--r--Source/Kernel/Shell/KernelShell.class.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/Source/Kernel/Shell/KernelShell.class.h b/Source/Kernel/Shell/KernelShell.class.h
new file mode 100644
index 0000000..182aa66
--- /dev/null
+++ b/Source/Kernel/Shell/KernelShell.class.h
@@ -0,0 +1,43 @@
+#ifndef DEF_KERNELSHELL_CLASS_H
+#define DEF_KERNELSHELL_CLASS_H
+
+#include <VTManager/VirtualTerminal.proto.h>
+#include <VFS/DirectoryNode.class.h>
+#include <TaskManager/Thread.class.h>
+#include <Library/Vector.class.h>
+
+class KernelShell {
+ friend u32int shellRun(void* ks);
+
+ private:
+ VirtualTerminal *m_vt;
+ DirectoryNode *m_cwd;
+ Thread* m_thread;
+ static u32int m_instances;
+
+ ~KernelShell();
+ u32int run();
+
+ //in KernelShell-fs
+ void ls(Vector<String>& args);
+ void cd(Vector<String>& args);
+ void pwd(Vector<String>& args);
+ void cat(Vector<String>& args);
+ void mkdir(Vector<String>& args);
+ void rm(Vector<String>& args);
+ void wf(Vector<String>& args);
+
+ //in KernelShell-sys
+ void devices(Vector<String>& args);
+ void loadkeys(Vector<String>& args);
+ void free(Vector<String>& args);
+ void uptime(Vector<String>& args);
+ void part(Vector<String>& args);
+
+ public:
+ KernelShell(DirectoryNode* cwd);
+
+ static u32int getInstances() { return m_instances; }
+};
+
+#endif