Skip to content

Commit ea3f5fb

Browse files
rddunlapzx2c4
authored andcommitted
main: rename 'mod_init' & 'mod_exit' functions to be module-specific
Rename module_init & module_exit functions that are named "mod_init" and "mod_exit" so that they are unique in both the System.map file and in initcall_debug output instead of showing up as almost anonymous "mod_init". This is helpful for debugging and in determining how long certain module_init calls take to execute. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
1 parent cb001d4 commit ea3f5fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <linux/genetlink.h>
1818
#include <net/rtnetlink.h>
1919

20-
static int __init mod_init(void)
20+
static int __init wg_mod_init(void)
2121
{
2222
int ret;
2323

@@ -65,16 +65,16 @@ static int __init mod_init(void)
6565
return ret;
6666
}
6767

68-
static void __exit mod_exit(void)
68+
static void __exit wg_mod_exit(void)
6969
{
7070
wg_genetlink_uninit();
7171
wg_device_uninit();
7272
wg_peer_uninit();
7373
wg_allowedips_slab_uninit();
7474
}
7575

76-
module_init(mod_init);
77-
module_exit(mod_exit);
76+
module_init(wg_mod_init);
77+
module_exit(wg_mod_exit);
7878
MODULE_LICENSE("GPL v2");
7979
MODULE_DESCRIPTION("WireGuard secure network tunnel");
8080
MODULE_AUTHOR("Jason A. Donenfeld <Jason@zx2c4.com>");

0 commit comments

Comments
 (0)