mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
Added REBOOT command.
svn path=/trunk/; revision=692
This commit is contained in:
parent
1d4d689bf2
commit
348ccdd39f
1 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,4 @@
|
|||
#include <ddk/ntddk.h>
|
||||
#include <windows.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue