X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fproc_fs.h;h=9b6c935f69cf6d1986677b968bb17c2ca000e4b0;hb=429f731dea577bdd43693940cdca524135287e6a;hp=e43551516831c53d2fd2ba021de863a54b02e709;hpb=f248dcb34d7b7ac255db70071a20be9d9c6ad491;p=linux-2.6 diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index e435515168..9b6c935f69 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -50,8 +50,6 @@ typedef int (read_proc_t)(char *page, char **start, off_t off, typedef int (write_proc_t)(struct file *file, const char __user *buffer, unsigned long count, void *data); typedef int (get_info_t)(char *, char **, off_t, int); -typedef struct proc_dir_entry *(shadow_proc_t)(struct task_struct *task, - struct proc_dir_entry *pde); struct proc_dir_entry { unsigned int low_ino; @@ -82,7 +80,6 @@ struct proc_dir_entry { int pde_users; /* number of callers into module in progress */ spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ struct completion *pde_unload_completion; - shadow_proc_t *shadow_proc; }; struct kcore_list { @@ -118,13 +115,17 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct int proc_pid_readdir(struct file * filp, void * dirent, filldir_t filldir); unsigned long task_vsize(struct mm_struct *); int task_statm(struct mm_struct *, int *, int *, int *, int *); -char *task_mem(struct mm_struct *, char *); +void task_mem(struct seq_file *, struct mm_struct *); +void clear_refs_smap(struct mm_struct *mm); struct proc_dir_entry *de_get(struct proc_dir_entry *de); void de_put(struct proc_dir_entry *de); extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent); +struct proc_dir_entry *proc_create(const char *name, mode_t mode, + struct proc_dir_entry *parent, + const struct file_operations *proc_fops); extern void remove_proc_entry(const char *name, struct proc_dir_entry *parent); extern struct vfsmount *proc_mnt; @@ -219,7 +220,12 @@ static inline void proc_flush_task(struct task_struct *task) static inline struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, struct proc_dir_entry *parent) { return NULL; } - +static inline struct proc_dir_entry *proc_create(const char *name, + mode_t mode, struct proc_dir_entry *parent, + const struct file_operations *proc_fops) +{ + return NULL; +} #define remove_proc_entry(name, parent) do {} while (0) static inline struct proc_dir_entry *proc_symlink(const char *name, @@ -260,8 +266,11 @@ extern void kclist_add(struct kcore_list *, void *, size_t); #endif union proc_op { - int (*proc_get_link)(struct inode *, struct dentry **, struct vfsmount **); + int (*proc_get_link)(struct inode *, struct path *); int (*proc_read)(struct task_struct *task, char *page); + int (*proc_show)(struct seq_file *m, + struct pid_namespace *ns, struct pid *pid, + struct task_struct *task); }; struct proc_inode {