aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--com32/modules/Makefile3
-rw-r--r--com32/modules/reboot.c16
2 files changed, 18 insertions, 1 deletions
diff --git a/com32/modules/Makefile b/com32/modules/Makefile
index b83a65cb..933987e2 100644
--- a/com32/modules/Makefile
+++ b/com32/modules/Makefile
@@ -47,7 +47,8 @@ INCDIR = /usr/include
COM32DIR = $(AUXDIR)/com32
MODULES = chain.c32 menu.c32 vesamenu.c32 ethersel.c32 mboot.c32 \
- dmitest.c32 cpuidtest.c32 pcitest.c32 elf.c32 linux.c32
+ dmitest.c32 cpuidtest.c32 pcitest.c32 elf.c32 linux.c32 \
+ reboot.c32
TESTFILES =
all: $(MODULES) $(TESTFILES)
diff --git a/com32/modules/reboot.c b/com32/modules/reboot.c
new file mode 100644
index 00000000..f5056759
--- /dev/null
+++ b/com32/modules/reboot.c
@@ -0,0 +1,16 @@
+#include <syslinux/reboot.h>
+#include <string.h>
+
+int main(int argc, char *argv[])
+{
+ int warm = 0;
+ int i;
+
+ for (i = 1; i < argc; i++) {
+ if (!strcmp(argv[i], "-w") ||
+ !strcmp(argv[i], "--warm"))
+ warm = 1;
+ }
+
+ syslinux_reboot(warm);
+}