Skip to content

Instantly share code, notes, and snippets.

@aliceinwire
Created June 7, 2018 16:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aliceinwire/59a66c7baed336b38bd8e11cb0409a5c to your computer and use it in GitHub Desktop.
Save aliceinwire/59a66c7baed336b38bd8e11cb0409a5c to your computer and use it in GitHub Desktop.
stdin
diff -Nupr src.orig/fs/proc/meminfo.c src/fs/proc/meminfo.c
--- src.orig/fs/proc/meminfo.c 2017-11-17 15:58:41.113211972 -0500
+++ src/fs/proc/meminfo.c 2017-11-17 15:58:58.554211972 -0500
@@ -42,6 +42,8 @@ static void show_val_kb(struct seq_file
seq_write(m, " kB\n", 4);
}
+static int foo = 5;
+
static int meminfo_proc_show(struct seq_file *m, void *v)
{
struct sysinfo i;
@@ -153,6 +155,7 @@ static int meminfo_proc_show(struct seq_
show_val_kb(m, "CmaFree: ",
global_page_state(NR_FREE_CMA_PAGES));
#endif
+ seq_printf(m, "kpatch: %d\n", foo);
hugetlb_report_meminfo(m);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment