summaryrefslogtreecommitdiff
path: root/Source/Kernel/Shell
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Kernel/Shell')
-rw-r--r--Source/Kernel/Shell/KernelShell.class.cpp12
-rw-r--r--Source/Kernel/Shell/KernelShell.class.h3
2 files changed, 13 insertions, 2 deletions
diff --git a/Source/Kernel/Shell/KernelShell.class.cpp b/Source/Kernel/Shell/KernelShell.class.cpp
index 3d76ee0..4232cd9 100644
--- a/Source/Kernel/Shell/KernelShell.class.cpp
+++ b/Source/Kernel/Shell/KernelShell.class.cpp
@@ -15,8 +15,8 @@ u32int shellRun(void* ks) {
return ret;
}
-KernelShell::KernelShell(DirectoryNode* cwd) {
- m_vt = new ScrollableVT(15, 76, 200, SHELL_FGCOLOR, SHELL_BGCOLOR);
+void KernelShell::setup(DirectoryNode* cwd, VirtualTerminal *vt) {
+ m_vt = vt;
((ScrollableVT*)m_vt)->map(9);
Kbd::setFocus(m_vt);
m_cwd = cwd;
@@ -25,6 +25,14 @@ KernelShell::KernelShell(DirectoryNode* cwd) {
m_instances++;
}
+KernelShell::KernelShell(DirectoryNode* cwd, VirtualTerminal* vt) {
+ setup(cwd, vt);
+}
+
+KernelShell::KernelShell(DirectoryNode* cwd) {
+ setup(cwd, new ScrollableVT(15, 76, 200, SHELL_FGCOLOR, SHELL_BGCOLOR));
+}
+
KernelShell::~KernelShell() {
delete m_vt;
m_instances--;
diff --git a/Source/Kernel/Shell/KernelShell.class.h b/Source/Kernel/Shell/KernelShell.class.h
index 182aa66..39e1ebd 100644
--- a/Source/Kernel/Shell/KernelShell.class.h
+++ b/Source/Kernel/Shell/KernelShell.class.h
@@ -34,7 +34,10 @@ class KernelShell {
void uptime(Vector<String>& args);
void part(Vector<String>& args);
+ void setup(DirectoryNode* cwd, VirtualTerminal *vt);
+
public:
+ KernelShell(DirectoryNode* cwd, VirtualTerminal *vt);
KernelShell(DirectoryNode* cwd);
static u32int getInstances() { return m_instances; }