Files
linux-kernel-module-cheat/userland/c/false.c
Ciro Santilli 六四事件 法轮功 aea97698c3 bak
2019-05-05 00:00:00 +00:00

18 lines
384 B
C

/* Exit with status 1.
*
* Can be uesd to test that emulators forward the exit status properly.
* https://github.com/cirosantilli/linux-kernel-module-cheat#gem5-syscall-emulation-exit-status
*/
#include <stdlib.h>
int main(int argc, char **argv) {
int ret;
if (argc == 1) {
ret = 1;
} else {
ret = strtoull(argv[1], NULL, 0);
}
return ret;
}