File: new-globals.patch

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (36 lines) | stat: -rw-r--r-- 953 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Index: kernel/fs/proc/cmdline.c
===================================================================
--- kernel.orig/fs/proc/cmdline.c
+++ kernel/fs/proc/cmdline.c
@@ -27,3 +27,10 @@ static int __init proc_cmdline_init(void
 	return 0;
 }
 module_init(proc_cmdline_init);
+
+#include <linux/printk.h>
+void kpatch_print_message(void)
+{
+	if (!jiffies)
+		printk("hello there!\n");
+}
Index: kernel/fs/proc/meminfo.c
===================================================================
--- kernel.orig/fs/proc/meminfo.c
+++ kernel/fs/proc/meminfo.c
@@ -16,6 +16,8 @@
 #include <asm/pgtable.h>
 #include "internal.h"
 
+void kpatch_print_message(void);
+
 void __attribute__((weak)) arch_report_meminfo(struct seq_file *m)
 {
 }
@@ -53,6 +55,7 @@ static int meminfo_proc_show(struct seq_
 	/*
 	 * Tagged format, for easy grepping and expansion.
 	 */
+	kpatch_print_message();
 	seq_printf(m,
 		"MemTotal:       %8lu kB\n"
 		"MemFree:        %8lu kB\n"