lkml.org 
[lkml]   [1996]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: /proc/cflags [PATCH] [take two] Was: animal names
Date
> Joel Maslak:
> >
> > This patch works on a recent kernel.
> >
> > It adds a /proc/animal so you can see what 'animal' the kernel currently
> > is. (This will not break until 2.10.0. It will work fine with 1.3.100
>
> What's next, /proc/cflags? :->

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;
}

\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.022 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site