replace ad hoc driver loading with a proper driver manager, new DDK, new PnP manager with device matching, asynchronous startup, resource ownership and removal, add shared PCI capability helpers, replace typed, rigid services with a proper service manager, implement proper system shutdown and restart, shutting down unloads drivers and shuts down services, add simple power button, remove heavyweight boot self-tests and SMP stress runs, add monotonic timestamps to kernel debug output, fruitless USB and PS/2 fixes, make test builds opt in.
This commit is contained in:
1 parent
c0ad63c27f
commit
d36f19509c
160 files changed
+6563
-7366
No files matched your search
@@ -11,6 +11,7 @@
|
||||
#include <spawn.h>
|
||||
#include <sys/wait.h>
|
||||
#include <ntlite/posix_extensions.h>
|
||||
#include <ntlite/syscall.h>
|
||||
|
||||
#define MAX_CMD 256
|
||||
|
||||
@@ -80,6 +81,8 @@ static void cmd_help() {
|
||||
" del <file> - Delete a file\n"
|
||||
" write <file> <txt> - Create a file with text\n"
|
||||
" clear - Clear the screen\n"
|
||||
" shutdown - Request system shutdown\n"
|
||||
" reboot - Request system restart\n"
|
||||
" exit - Close the shell\n");
|
||||
}
|
||||
|
||||
@@ -196,6 +199,13 @@ static void cmd_type(const char* filename) {
|
||||
// Runs command.
|
||||
static bool runCommand(const char* cmd) {
|
||||
if (!cmd || *cmd == '\0') return false;
|
||||
if (strcmp(cmd, "shutdown") == 0 || strcmp(cmd, "reboot") == 0) {
|
||||
uint32_t action = strcmp(cmd, "reboot") == 0
|
||||
? SYS_POWER_ACTION_RESTART : SYS_POWER_ACTION_SHUTDOWN;
|
||||
KSTATUS st = SysRequestSystemPower(action);
|
||||
if (!KSUCCESS(st)) print("power: request failed\n");
|
||||
return false;
|
||||
}
|
||||
if (strcmp(cmd, "exit") == 0) return true;
|
||||
if (strcmp(cmd, "help") == 0) { cmd_help(); return false; }
|
||||
if (strcmp(cmd, "clear") == 0) { clearscreen(); return false; }
|
||||
|
||||
Reference in new issue
Block a user