feat: added ps command
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#include <myke/libk/libk.h>
|
||||
#include <myke/mem/malloc.h>
|
||||
#include <myke/mem/mem.h>
|
||||
#include <myke/tasks/task.h>
|
||||
#include <myke/util/power.h>
|
||||
|
||||
#ifdef ENABLE_SELF_TEST
|
||||
@@ -50,11 +51,13 @@ void help(const char *args);
|
||||
|
||||
void shutdown(const char *args);
|
||||
|
||||
void ps(const char *args);
|
||||
|
||||
#ifdef ENABLE_SELF_TEST
|
||||
|
||||
void explode(const char *args);
|
||||
|
||||
void kill_self(const char* args);
|
||||
void kill_self(const char *args);
|
||||
|
||||
void exec_self_test(const char *args);
|
||||
|
||||
@@ -70,6 +73,7 @@ cmd_handler cmd_handlers[] = {
|
||||
{"print", print},
|
||||
{"ide", ide},
|
||||
{"shutdown", shutdown},
|
||||
{"ps", ps},
|
||||
#ifdef ENABLE_SELF_TEST
|
||||
{"slingurl", slingurl},
|
||||
{"kill-self", kill_self},
|
||||
@@ -92,7 +96,7 @@ void smash(const char *args) {
|
||||
memset(data, 'A', 32);
|
||||
}
|
||||
|
||||
void kill_self(const char* args) {
|
||||
void kill_self(const char *args) {
|
||||
syscall_kill_self();
|
||||
}
|
||||
|
||||
@@ -115,6 +119,10 @@ void shutdown(const char *args) {
|
||||
power_shutdown();
|
||||
}
|
||||
|
||||
void ps(const char *args) {
|
||||
task_print_all();
|
||||
}
|
||||
|
||||
void print_bootinfo() {
|
||||
printf("Bootloader name: %s\n"
|
||||
"cmdline: %s\n",
|
||||
|
||||
Reference in New Issue
Block a user