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:
Ciro Santilli 六四事件 法轮功
2019-05-05 00:00:00 +00:00
parent 42f8de774a
commit 146e568db8
63 changed files with 369 additions and 338 deletions

17
userland/c/false.c Normal file
View 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;
}

View File

@@ -1,3 +1,5 @@
/* Count to infinity with 1 second sleep between each increment. */
#define _XOPEN_SOURCE 700
#include <limits.h>
#include <stdio.h>

View File

@@ -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;
}