patch-2.4.0-test3 linux/fs/proc/proc_misc.c
Next file: linux/fs/qnx4/fsync.c
Previous file: linux/fs/proc/base.c
Back to the patch index
Back to the overall index
- Lines: 40
- Date:
Sat Jul 8 19:26:13 2000
- Orig file:
v2.4.0-test2/linux/fs/proc/proc_misc.c
- Orig date:
Fri May 12 14:18:56 2000
diff -u --recursive --new-file v2.4.0-test2/linux/fs/proc/proc_misc.c linux/fs/proc/proc_misc.c
@@ -508,18 +508,6 @@
return len;
}
-static int slabinfo_read_proc(char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- int len = get_slabinfo(page);
- if (len <= off+count) *eof = 1;
- *start = page + off;
- len -= off;
- if (len>count) len = count;
- if (len<0) len = 0;
- return len;
-}
-
static int memory_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
{
@@ -638,7 +626,6 @@
{"locks", locks_read_proc},
{"mounts", mounts_read_proc},
{"swaps", swaps_read_proc},
- {"slabinfo", slabinfo_read_proc},
{"iomem", memory_read_proc},
{"execdomains", execdomains_read_proc},
{NULL,NULL}
@@ -671,4 +658,12 @@
entry->proc_fops = &ppc_htab_operations;
}
#endif
+ {
+ struct proc_dir_entry *res = create_proc_entry("slabinfo",
+ S_IWUSR | S_IRUGO, NULL);
+ if (res) {
+ res->read_proc = slabinfo_read_proc;
+ res->write_proc = slabinfo_write_proc;
+ }
+ }
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)