kpatch/test/integration/macro-hooks.patch
Josh Poimboeuf eb62038e92 test: add hook macro test
From issue #357.
2014-08-13 14:24:18 -05:00

21 lines
464 B
Diff

Index: src/fs/aio.c
===================================================================
--- src.orig/fs/aio.c
+++ src/fs/aio.c
@@ -1642,3 +1642,15 @@ SYSCALL_DEFINE5(io_getevents, aio_contex
}
return ret;
}
+
+void kpatch_load_aio_max_nr(void)
+{
+ aio_max_nr = 0x40000;
+}
+void kpatch_unload_aio_max_nr(void)
+{
+ aio_max_nr = 0x10000;
+}
+#include "kpatch-macros.h"
+KPATCH_LOAD_HOOK(kpatch_load_aio_max_nr);
+KPATCH_UNLOAD_HOOK(kpatch_unload_aio_max_nr);