From 348ccdd39f8aeabe3f9e924186204663a53dd1d6 Mon Sep 17 00:00:00 2001 From: Eric Kohl Date: Mon, 11 Oct 1999 20:51:07 +0000 Subject: [PATCH] Added REBOOT command. svn path=/trunk/; revision=692 --- reactos/apps/utils/shell/shell.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/reactos/apps/utils/shell/shell.c b/reactos/apps/utils/shell/shell.c index e8bcfd7119c..b6cf849897f 100644 --- a/reactos/apps/utils/shell/shell.c +++ b/reactos/apps/utils/shell/shell.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -71,6 +72,13 @@ void ExecuteDir(char* cmdline) FindClose(shandle); } + +void ExecuteReboot(char* cmdline) +{ + NtShutdownSystem (ShutdownReboot); +} + + void ExecuteType(char* cmdline) { HANDLE FileHandle; @@ -278,6 +286,11 @@ void ExecuteCommand(char* line) ExecuteKill(tail); return; } + if (strcmp(cmd,"reboot")==0) + { + ExecuteReboot(tail); + return; + } if (strcmp(cmd,"type")==0) { ExecuteType(tail); @@ -285,7 +298,7 @@ void ExecuteCommand(char* line) } if (strcmp(cmd,"ver")==0) { - ExecuteVer(); + ExecuteVer(); return; } if (strcmp(cmd,"validate")==0) @@ -303,8 +316,8 @@ void ExecuteCommand(char* line) } if (strcmp(cmd,"start") == 0) { - ExecuteStart(tail); - return; + ExecuteStart(tail); + return; } if (strcmp(cmd,"exit")==0) {