reboot-stub.c (423B)
- // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- // SPDX-License-Identifier: MPL-2.0
- #define _GNU_SOURCE
- #include <linux/reboot.h> // LINUX_REBOOT_*
- #include <sys/syscall.h> // SYS_*
- #include <unistd.h> // syscall
- #include <stdio.h> // perror
- int
- main(void)
- {
- syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART);
- perror("reboot");
- return 1;
- }