mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
bak
This commit is contained in:
@@ -13,5 +13,5 @@ int main(int argc, char **argv) {
|
||||
} else {
|
||||
ret = strtoull(argv[1], NULL, 0);
|
||||
}
|
||||
return ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
puts("hello");
|
||||
return EXIT_SUCCESS;
|
||||
puts("hello");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
14
userland/c/print_argv.c
Normal file
14
userland/c/print_argv.c
Normal file
@@ -0,0 +1,14 @@
|
||||
/* Print each command line argument received, one per line.
|
||||
*
|
||||
* Good sanity check for user mode:
|
||||
* https://github.com/cirosantilli/linux-kernel-module-cheat#qemu-user-mode-getting-started
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
size_t i;
|
||||
for (i = 0; i < (size_t)argc; ++i)
|
||||
printf("%s\n", argv[i]);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user