kpatch/kmod/patch/kpatch-patch-hook.c
Josh Poimboeuf 4f27b9ae31 functional reorganization
Organize the files functionally:
- kmod/core: core kmod source
- kmod/patch: patch kmod source
- kpatch: kpatch script
- kpatch-build: kpatch build script and supporting tools
- contrib: distro-related files
2014-02-13 11:00:06 -06:00

25 lines
519 B
C

#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h>
#include <linux/printk.h>
#include "kpatch.h"
extern char __kpatch_patches, __kpatch_patches_end;
static int __init patch_init(void)
{
printk("patch loading\n");
return kpatch_register(THIS_MODULE, &__kpatch_patches,
&__kpatch_patches_end);
}
static void __exit patch_exit(void)
{
printk("patch unloading\n");
kpatch_unregister(THIS_MODULE);
}
module_init(patch_init);
module_exit(patch_exit);
MODULE_LICENSE("GPL");