mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
Motivation: userland is getting several new subdirectories, it would be too insane to just dump all of that in the guest root filesystem. To alleviate the cd pain, .profile puts user inside /lkmc by default.
18 lines
381 B
C
18 lines
381 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;
|
|
}
|