diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-10-02 05:17:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:13 -0400 |
commit | 20cdc894c45d2e4ab0c69e95a56b7c5ed36ae0dd (patch) | |
tree | 889b369ebf1a54a96e8a93c2d8c49921ed2fc4b4 /include/linux | |
parent | 28a6d67179da6964d1640d379c5e5d4f46dd0042 (diff) |
[PATCH] proc: modify proc_pident_lookup to be completely table driven
Currently proc_pident_lookup gets the names and types from a table and then
has a huge switch statement to get the inode and file operations it needs.
That is silly and is becoming increasingly hard to maintain so I just put all
of the information in the table.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/proc_fs.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 57f70bc8b24b..87dec8fe6de9 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -244,13 +244,15 @@ static inline void kclist_add(struct kcore_list *new, void *addr, size_t size) | |||
244 | extern void kclist_add(struct kcore_list *, void *, size_t); | 244 | extern void kclist_add(struct kcore_list *, void *, size_t); |
245 | #endif | 245 | #endif |
246 | 246 | ||
247 | union proc_op { | ||
248 | int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); | ||
249 | int (*proc_read)(struct task_struct *task, char *page); | ||
250 | }; | ||
251 | |||
247 | struct proc_inode { | 252 | struct proc_inode { |
248 | struct pid *pid; | 253 | struct pid *pid; |
249 | int fd; | 254 | int fd; |
250 | union { | 255 | union proc_op op; |
251 | int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); | ||
252 | int (*proc_read)(struct task_struct *task, char *page); | ||
253 | } op; | ||
254 | struct proc_dir_entry *pde; | 256 | struct proc_dir_entry *pde; |
255 | struct inode vfs_inode; | 257 | struct inode vfs_inode; |
256 | }; | 258 | }; |