From 794a8efaeddca3085c6f9807189aa8c1d212c3bd Mon Sep 17 00:00:00 2001 From: Martin Baulig Date: Sun, 14 Jun 1998 12:40:59 +0000 Subject: [PATCH] Added README. 1998-06-14 Martin Baulig * README: Added README. * kernel.patch: Patch for the Linux kernel to add the new system call. --- kernel/ChangeLog | 6 ++++++ kernel/README | 21 +++++++++++++++++++ kernel/kernel.patch | 49 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 76 insertions(+) create mode 100644 kernel/ChangeLog create mode 100644 kernel/README create mode 100644 kernel/kernel.patch diff --git a/kernel/ChangeLog b/kernel/ChangeLog new file mode 100644 index 00000000..dfde45e2 --- /dev/null +++ b/kernel/ChangeLog @@ -0,0 +1,6 @@ +1998-06-14 Martin Baulig + + * README: Added README. + + * kernel.patch: Patch for the Linux kernel to add the + new system call. diff --git a/kernel/README b/kernel/README new file mode 100644 index 00000000..88d26bec --- /dev/null +++ b/kernel/README @@ -0,0 +1,21 @@ +This is a new system call `table ()' for the Linux table. It is faster +than reading from /proc and can be used to fetch all information required +for libgtop until whe have some other function (extended sysctl, ...) in +standard kernels. + +I didn't want to change sysctl or some other function myself cause this may +cause other applications relying upon those function to fail. This is +something for the ``real'' kernel gurus ... + +To use this new system call for libgtop, do the following: + +* Copy this directory to /usr/src/linux/table +* Make /usr/src/linux/include/linux/table.h symlink to /usr/src/linux/table/table.h +* Apply the patch `kernel.patch' to the kernel, compile, install and reboot +* Recompile libgtop (remove `config.cache' and run the `autogen.sh' again). + +If you want to change and/or add something - feel free to do so ! + +Have fun, + +Martin diff --git a/kernel/kernel.patch b/kernel/kernel.patch new file mode 100644 index 00000000..0ac00716 --- /dev/null +++ b/kernel/kernel.patch @@ -0,0 +1,49 @@ +diff -ur linux-2.0.32/Makefile linux-hacked/Makefile +--- linux-2.0.32/Makefile Fri Nov 7 19:51:05 1997 ++++ linux-hacked/Makefile Thu Jun 11 20:41:12 1998 +@@ -87,7 +87,7 @@ + # standard CFLAGS + # + +-CFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -fno-strength-reduce ++CFLAGS = -Wall -Wstrict-prototypes -g -O2 -fomit-frame-pointer -fno-strength-reduce + + ifdef CONFIG_CPP + CFLAGS := $(CFLAGS) -x c++ +@@ -113,12 +113,12 @@ + # Include the make variables (CC, etc...) + # + +-ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o net/network.a ++ARCHIVES =kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o net/network.a table/table.o + FILESYSTEMS =fs/filesystems.a + DRIVERS =drivers/block/block.a \ + drivers/char/char.a + LIBS =$(TOPDIR)/lib/lib.a +-SUBDIRS =kernel drivers mm fs net ipc lib ++SUBDIRS =kernel drivers mm fs net ipc lib table + + ifeq ($(CONFIG_ISDN),y) + DRIVERS := $(DRIVERS) drivers/isdn/isdn.a +diff -ur linux-2.0.32/arch/i386/kernel/entry.S linux-hacked/arch/i386/kernel/entry.S +--- linux-2.0.32/arch/i386/kernel/entry.S Tue Sep 16 23:42:45 1997 ++++ linux-hacked/arch/i386/kernel/entry.S Thu Jun 11 21:37:20 1998 +@@ -699,4 +699,6 @@ + .long SYMBOL_NAME(sys_mremap) + .long 0,0 + .long SYMBOL_NAME(sys_vm86) +- .space (NR_syscalls-166)*4 ++ .long 0 ++ .long SYMBOL_NAME(sys_table) ++ .space (NR_syscalls-168)*4 +diff -ur linux-2.0.32/include/asm-i386/unistd.h linux-hacked/include/asm-i386/unistd.h +--- linux-2.0.32/include/asm-i386/unistd.h Fri Mar 22 07:34:02 1996 ++++ linux-hacked/include/asm-i386/unistd.h Thu Jun 11 21:37:03 1998 +@@ -169,6 +169,7 @@ + #define __NR_sched_rr_get_interval 161 + #define __NR_nanosleep 162 + #define __NR_mremap 163 ++#define __NR_table 168 + + /* XXX - _foo needs to be __foo, while __NR_bar could be _NR_bar. */ + #define _syscall0(type,name) \