patch-1.3.50 linux/fs/proc/array.c

Next file: linux/fs/proc/base.c
Previous file: linux/fs/pipe.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.49/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -291,6 +291,13 @@
 	return strlen(buffer);
 }
 
+static int get_cmdline(char * buffer)
+{
+	extern char saved_command_line[];
+
+	return sprintf(buffer, "%s\n", saved_command_line);
+}
+
 static struct task_struct ** get_task(pid_t pid)
 {
 	struct task_struct ** p;
@@ -827,6 +834,8 @@
 		case PROC_APM:
 			return apm_proc(page);
 #endif
+		case PROC_CMDLINE:
+			return get_cmdline(page);
 	}
 	return -EBADF;
 }
@@ -927,6 +936,8 @@
 	NULL,			/* rename */
 	NULL,			/* readlink */
 	NULL,			/* follow_link */
+	NULL,			/* readpage */
+	NULL,			/* writepage */
 	NULL,			/* bmap */
 	NULL,			/* truncate */
 	NULL			/* permission */
@@ -973,6 +984,8 @@
 	NULL,			/* rename */
 	NULL,			/* readlink */
 	NULL,			/* follow_link */
+	NULL,			/* readpage */
+	NULL,			/* writepage */
 	NULL,			/* bmap */
 	NULL,			/* truncate */
 	NULL			/* permission */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this