logo

bootstrap-initrd

Linux initrd to bootstrap from a small binary seed git clone https://anongit.hacktivis.me/git/bootstrap-initrd.git/

reboot-stub.c (286B)


  1. // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  2. // SPDX-License-Identifier: MPL-2.0
  3. #define _GNU_SOURCE
  4. #include <sys/reboot.h> // reboot, RB_*
  5. #include <stdio.h> // perror
  6. int
  7. main(void)
  8. {
  9. reboot(RB_AUTOBOOT);
  10. perror("reboot");
  11. return 1;
  12. }