OOPS! Hope no one tried to apply that cruft I left at the end
of the message... :) This one really works, comments welcome.
--jf
--- linux/fs/proc/array.c.orig Wed May 1 13:13:45 1996
+++ linux/fs/proc/array.c Wed May 1 13:22:29 1996
@@ -43,6 +43,7 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
+#include <linux/compile.h>
#include <asm/segment.h>
#include <asm/pgtable.h>
@@ -317,6 +318,11 @@
return sprintf(buffer, "%s\n", saved_command_line);
}
+static int get_cflags(char * buffer)
+{
+ return sprintf(buffer, "%s\n", LINUX_CFLAGS);
+}
+
static struct task_struct ** get_task(pid_t pid)
{
struct task_struct ** p;
@@ -1041,6 +1047,8 @@
case PROC_RTC:
return get_rtc_status(page);
#endif
+ case PROC_CFLAGS:
+ return get_cflags(page);
}
return -EBADF;
}