[229] in linux-scsi channel archive

home help back first fref pref prev next nref lref last post

Re: kernel enhancements

daemon@ATHENA.MIT.EDU (Russell Nelson)
Mon Jun 5 10:44:26 1995

Date: Mon, 5 Jun 95 09:23 EDT
From: nelson@crynwr.com (Russell Nelson)
To: jduersto@kendall.mdcc.edu
CC: linux-kernel@vger.rutgers.edu, linux-scsi@vger.rutgers.edu
In-reply-to: <199506050525.BAA01208@rivendell.kendall.mdcc.edu> (jduersto@kendall.mdcc.edu)

   From: jduersto@kendall.mdcc.edu
   Date:          Mon, 5 Jun 1995 01:14:01 +0000

   ... identify which kernel options were included, and which were
   not. ...  This information then could be stored as a file in the
   /proc file-system (/proc/kernel-options maybe?).

That's what I did in my /proc/config patch, posted to linux-kernel May
10.  It's only 2K -- I'll repost it.

--- Makefile.orig	Tue Mar 21 23:11:10 1995
+++ Makefile	Tue May  9 17:31:03 1995
@@ -166,6 +166,7 @@
 	 fi >> include/linux/version.h
 	@echo \#define LINUX_COMPILER \"`$(HOSTCC) -v 2>&1 | tail -1`\" >> include/linux/version.h
 	@echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)` >> include/linux/version.h
+	@echo \#define LINUX_CONFIG \"`sed -e /^#/d -e /^$$/d -e s/^CONFIG_// -e s/=y$$// <.config`\" >> include/linux/version.h
 
 init/version.o: init/version.c include/linux/version.h
 	$(CC) $(CFLAGS) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
--- proc_fs.h.orig	Tue Mar 21 22:59:24 1995
+++ proc_fs.h	Tue May  9 17:37:49 1995
@@ -14,6 +14,7 @@
 	PROC_MEMINFO,
 	PROC_KMSG,
 	PROC_VERSION,
+	PROC_CONFIG,
 	PROC_CPUINFO,
 	PROC_PCI,
 	PROC_SELF,	/* will change inode # */
--- fs/proc/root.c.orig	Tue May  9 17:37:18 1995
+++ fs/proc/root.c	Tue May  9 23:42:12 1995
@@ -59,6 +59,7 @@
 	{ PROC_MEMINFO,		7, "meminfo" },
 	{ PROC_KMSG,		4, "kmsg" },
 	{ PROC_VERSION,		7, "version" },
+	{ PROC_CONFIG,		6, "config" },
 #ifdef CONFIG_PCI
 	{ PROC_PCI,             3, "pci"  },
 #endif
--- fs/proc/array.c.orig	Tue Mar 21 23:06:22 1995
+++ fs/proc/array.c	Tue May  9 17:35:55 1995
@@ -273,4 +273,12 @@
 	return strlen(buffer);
 }
 
+static int get_config(char * buffer)
+{
+	extern char *linux_config;
+
+	strcpy(buffer, linux_config);
+	return strlen(buffer);
+}
+
 static int get_cpuinfo(char * buffer)
 {
@@ -775,6 +783,9 @@
 
 		case PROC_VERSION:
 			return get_version(page);
+
+		case PROC_CONFIG:
+			return get_config(page);
 
 #ifdef CONFIG_DEBUG_MALLOC
 		case PROC_MALLOC:
--- init/version.c.orig	Tue May  9 17:32:36 1995
+++ init/version.c	Tue May  9 23:50:21 1995
@@ -18,3 +18,5 @@
 char *linux_banner = 
 	"Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
 	LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
+
+char *linux_config = LINUX_CONFIG "\n";


home help back first fref pref prev next nref lref last post