mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-28 20:44:26 +01:00
baremetal: get exit status working with on_exit :-)
This commit is contained in:
9
lkmc.c
9
lkmc.c
@@ -12,11 +12,16 @@ void lkmc_assert(bool condition) {
|
||||
}
|
||||
|
||||
void lkmc_assert_fail(void) {
|
||||
printf("%s\n", __func__);
|
||||
puts("lkmc_exit_status_1");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void lkmc_baremetal_on_exit_callback(int status, void *arg) {
|
||||
(void)arg;
|
||||
if (status != 0) {
|
||||
printf("lkmc_exit_status_%d\n", status);
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(__aarch64__)
|
||||
#define LKMC_SYSREG_READ_WRITE(type, name) \
|
||||
type LKMC_CONCAT(LKMC_CONCAT(LKMC_SYSREG_SYMBOL_PREFIX, name), _read(void)) { \
|
||||
|
||||
Reference in New Issue
Block a user