patch-2.3.43 linux/fs/proc/base.c

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

diff -u --recursive --new-file v2.3.42/linux/fs/proc/base.c linux/fs/proc/base.c
@@ -15,7 +15,6 @@
 
 #include <asm/uaccess.h>
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/proc_fs.h>
@@ -206,8 +205,7 @@
 }
 
 static struct file_operations proc_maps_operations = {
-	NULL,		/* array_lseek */
-	pid_maps_read,
+	read:		pid_maps_read,
 };
 
 struct inode_operations proc_maps_inode_operations = {
@@ -258,8 +256,7 @@
 }
 
 static struct file_operations proc_info_file_operations = {
-    NULL,			/* lseek   */
-    proc_info_read,		/* read	   */
+	read:		proc_info_read,
 };
 
 static struct inode_operations proc_info_inode_operations = {
@@ -348,9 +345,8 @@
 }
 
 static struct file_operations proc_mem_operations = {
-	NULL,		/* lseek - default */
-	mem_read,
-	mem_write,
+	read:		mem_read,
+	write:		mem_write,
 };
 
 static struct inode_operations proc_mem_inode_operations = {
@@ -366,9 +362,6 @@
 	NULL,			/* rename */
 	NULL,			/* readlink */
 	NULL,			/* follow_link */
-	NULL,			/* get_block */
-	NULL,			/* readpage */
-	NULL,			/* writepage */
 	NULL,			/* truncate */
 	proc_permission,	/* permission */
 	NULL			/* revalidate */
@@ -456,18 +449,8 @@
 }
 
 static struct inode_operations proc_pid_link_inode_operations = {
-	NULL,			/* file-operations */
-	NULL,			/* create */
-	NULL,			/* lookup */
-	NULL,			/* link */
-	NULL,			/* unlink */
-	NULL,			/* symlink */
-	NULL,			/* mkdir */
-	NULL,			/* rmdir */
-	NULL,			/* mknod */
-	NULL,			/* rename */
-	proc_pid_readlink,	/* readlink */
-	proc_pid_follow_link,	/* follow_link */
+	readlink:	proc_pid_readlink,
+	follow_link:	proc_pid_follow_link
 };
 
 /* reading from directory - bad */
@@ -761,10 +744,8 @@
 }
 
 static struct file_operations proc_fd_operations = {
-	NULL,			/* lseek - default */
-	proc_dir_read,		/* read - bad */
-	NULL,			/* write - bad */
-	proc_readfd,		/* readdir */
+	read: proc_dir_read,		/* read - bad */
+	readdir: proc_readfd,		/* readdir */
 };
 
 /*
@@ -783,9 +764,6 @@
 	NULL,			/* rename */
 	NULL,			/* readlink */
 	NULL,			/* follow_link */
-	NULL,			/* get_block */
-	NULL,			/* readpage */
-	NULL,			/* writepage */
 	NULL,			/* truncate */
 	proc_permission,	/* permission */
 };
@@ -882,10 +860,8 @@
 }
 
 static struct file_operations proc_base_operations = {
-	NULL,			/* lseek - default */
-	proc_dir_read,		/* read - bad */
-	NULL,			/* write - bad */
-	proc_base_readdir,	/* readdir */
+	read: proc_dir_read,		/* read - bad */
+	readdir: proc_base_readdir,	/* readdir */
 };
 
 static struct inode_operations proc_base_inode_operations = {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)