mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
Create /eval_base64.sh to overcome quoting and newline limitations. Documente poweroff's failure on readme.
13 lines
271 B
C
13 lines
271 B
C
/* Userspace is for the weak. Die.
|
|
* https://stackoverflow.com/questions/28812514/how-to-shutdown-linux-using-c-or-qt-without-call-to-system
|
|
**/
|
|
|
|
#include <stdio.h>
|
|
#include <sys/reboot.h>
|
|
#include <unistd.h>
|
|
|
|
int main(void) {
|
|
puts(__FILE__);
|
|
reboot(RB_POWER_OFF);
|
|
}
|