mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-27 12:04:27 +01:00
baremetal: symlink all programs that currently run on both userland and baremetal
This commit is contained in:
18
lkmc/c/assert_fail.c
Normal file
18
lkmc/c/assert_fail.c
Normal file
@@ -0,0 +1,18 @@
|
||||
/* Let's see what happens when an assert fails.
|
||||
*
|
||||
* Outcome on Ubuntu 19.04 shows the failure line:
|
||||
*
|
||||
* assert_fail.out: /path/to/linux-kernel-module-cheat/userland/c/assert_fail.c:15: main: Assertion `0' failed.
|
||||
*
|
||||
* and exit status 134 == 128 + 6, which corresponds to SIGABORT (6).
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main(void) {
|
||||
assert(0);
|
||||
puts("here");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user