mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
move all our stuff into /lkmc in guest
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.
This commit is contained in:
17
userland/c/false.c
Normal file
17
userland/c/false.c
Normal file
@@ -0,0 +1,17 @@
|
||||
/* 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;
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
/* Count to infinity with 1 second sleep between each increment. */
|
||||
|
||||
#define _XOPEN_SOURCE 700
|
||||
#include <limits.h>
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/* Test that emulators forward the exit status properly. */
|
||||
|
||||
#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;
|
||||
}
|
||||
Reference in New Issue
Block a user