18 lines
429 B
C++
18 lines
429 B
C++
/*
|
|
* main.cpp
|
|
* reset - Reboot the system
|
|
* Copyright (c) 2025-2026 Daniel Hammer
|
|
*/
|
|
|
|
#include <montauk/syscall.h>
|
|
|
|
extern "C" void _start() {
|
|
montauk::print("Rebooting...\n");
|
|
int rc = montauk::reset();
|
|
if (montauk::StatusFromResult(rc) == montauk::CapabilityDenied)
|
|
montauk::print("reset: permission denied\n");
|
|
else
|
|
montauk::print("reset: reboot failed\n");
|
|
montauk::exit(1);
|
|
}
|