Files
2019-07-07 00:00:01 +00:00

19 lines
478 B
C

/* Exit with status 1 like the POSIX false utility:
* http://pubs.opengroup.org/onlinepubs/9699919799/utilities/false.html
*
* Can be uesd to test that emulators forward the exit status properly.
* https://cirosantilli.com/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;
}