logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/
commit: 41c221277b625cfd359da2ac57a9f9818756f605
parent 96f3d7ad44efd416c340edcf76dcba3986d62055
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 21 Jun 2025 01:30:17 +0200

src/reboot-stub.c: Use musl reboot() function

Diffstat:

Msrc/reboot-stub.c6++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/reboot-stub.c b/src/reboot-stub.c @@ -2,15 +2,13 @@ // 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 <sys/reboot.h> // reboot, RB_* #include <stdio.h> // perror int main(void) { - syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_RESTART); + reboot(RB_AUTOBOOT); perror("reboot"); return 1; }