From eefbee99bedddea7321cc36dddb207b9653f6e36 Mon Sep 17 00:00:00 2001 From: netchild Date: Sun, 8 Oct 2006 16:55:27 +0000 Subject: Implement /proc/sys/kernel/pid_max. Submitted by: rdivacky Tested with: LTP --- sys/compat/linprocfs/linprocfs.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'sys') diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index 6f32aaf..0776b46 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -925,6 +925,17 @@ linprocfs_donetdev(PFS_FILL_ARGS) } /* + * Filler function for proc/pid_max + */ +static int +linprocfs_dopid_max(PFS_FILL_ARGS) +{ + sbuf_printf(sb, "%i\n", PID_MAX); + + return (0); +} + +/* * Filler function for proc/scsi/device_info */ static int @@ -1063,6 +1074,14 @@ linprocfs_init(PFS_INIT_ARGS) NULL, NULL, PFS_RD); pfs_create_file(dir, "scsi", &linprocfs_doscsiscsi, NULL, NULL, PFS_RD); + + /* /proc/sys/... */ + dir = pfs_create_dir(root, "sys", NULL, NULL, 0); + /* /proc/sys/kernel/... */ + dir = pfs_create_dir(dir, "kernel", NULL, NULL, 0); + pfs_create_file(dir, "pid_max", &linprocfs_dopid_max, + NULL, NULL, PFS_RD); + return (0); } -- cgit v1.1