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
@@ -1,6 +1,7 @@
|
||||
// User application entry points for shell_win32.
|
||||
|
||||
#include <windows.h>
|
||||
#include <ntlite/syscall.h>
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
@@ -76,6 +77,8 @@ static void cmd_help() {
|
||||
" del <file> - Delete a file\n"
|
||||
" write <file> <tx> - 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");
|
||||
}
|
||||
|
||||
@@ -211,6 +214,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) { ClearConsoleScreenBuffer(hOut); return false; }
|
||||
|
||||
Reference in new issue
Block a user