summaryrefslogtreecommitdiff
path: root/Source/Applications/Shell/Shell.ns.cpp
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2009-10-24 18:24:46 +0200
committerAlexis211 <alexis211@gmail.com>2009-10-24 18:24:46 +0200
commitb639b99b3e8f4cf77560d8d473b13d992ac8eb10 (patch)
tree63ebeec75f4ab71d73d743afca04a98636dee165 /Source/Applications/Shell/Shell.ns.cpp
parentf62cfdc8ff6297616d68f6b195db7abc82ab457b (diff)
downloadMelon-b639b99b3e8f4cf77560d8d473b13d992ac8eb10.tar.gz
Melon-b639b99b3e8f4cf77560d8d473b13d992ac8eb10.zip
More work on userland syscalls : Files are implemented.
TextFile now is a common (= kernel and userland) library.
Diffstat (limited to 'Source/Applications/Shell/Shell.ns.cpp')
-rw-r--r--Source/Applications/Shell/Shell.ns.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Applications/Shell/Shell.ns.cpp b/Source/Applications/Shell/Shell.ns.cpp
index fe8c5f9..7213094 100644
--- a/Source/Applications/Shell/Shell.ns.cpp
+++ b/Source/Applications/Shell/Shell.ns.cpp
@@ -16,6 +16,8 @@ u32int run() {
{"pwd", pwd},
{"rm", rm},
{"mkdir", mkdir},
+ {"cat", cat},
+ {"wf", wf},
{"", 0}
};
@@ -56,6 +58,14 @@ u32int run() {
} else if (cmd[0] == "reboot") {
Sys::reboot();
outvt << "Something went wrong.\n";
+ } else if (cmd[0] == "uptime") {
+ outvt << "Uptime : " << (s64int)Sys::uptime() << "s\n";
+ } else if (cmd[0] == "free") {
+ outvt << "Free RAM : " << (s64int)Sys::freeRam() << " Kio of " << (s64int)Sys::totalRam() << " Kio\n";
+ } else if (cmd[0] == "help") {
+ while (cmd.size() > 1) cmd.pop();
+ cmd.push("/Applications/Shell/Help.txt");
+ cat(cmd);
} else {
u32int i = 0;
bool found = false;