mirror of
https://github.com/openwall/lkrg.git
synced 2023-12-13 21:30:29 +01:00
Add macro to genereate install func.
Signed-off-by: Mariusz Zaborski <oshogbo@vexillium.org>
This commit is contained in:
parent
cf7ac2f321
commit
6a670f48a6
1 changed files with 9 additions and 0 deletions
|
@ -24,4 +24,13 @@
|
|||
int p_install_hook(struct kretprobe *kretprobe, char *state);
|
||||
void p_uninstall_hook(struct kretprobe *kretprobe, char *state);
|
||||
|
||||
#define GENEREATE_INSTALL_FUNC(name) \
|
||||
int p_install_##name##_hook(void) { \
|
||||
return p_install_hook(&p_##name##_kretprobe, &p_##name##_kretprobe_state); \
|
||||
} \
|
||||
\
|
||||
void p_uninstall_##name##_hook(void) { \
|
||||
return p_uninstall_hook(&p_##name##_kretprobe, &p_##name##_kretprobe_state); \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue