From 271a15eabe094538d958dc68ccfc9c36b699247a Mon Sep 17 00:00:00 2001 From: David Howells Date: Fri, 12 Apr 2013 00:38:51 +0100 Subject: proc: Supply PDE attribute setting accessor functions Supply accessor functions to set attributes in proc_dir_entry structs. The following are supplied: proc_set_size() and proc_set_user(). Signed-off-by: David Howells Acked-by: Mauro Carvalho Chehab cc: linuxppc-dev@lists.ozlabs.org cc: linux-media@vger.kernel.org cc: netdev@vger.kernel.org cc: linux-wireless@vger.kernel.org cc: linux-pci@vger.kernel.org cc: netfilter-devel@vger.kernel.org cc: alsa-devel@alsa-project.org Signed-off-by: Al Viro --- include/linux/proc_fs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 805edacfc2fc..28a4d7e78803 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h @@ -130,6 +130,9 @@ static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, struct proc_dir_entry *parent); +extern void proc_set_size(struct proc_dir_entry *, loff_t); +extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t); + extern struct file *proc_ns_fget(int fd); extern bool proc_ns_inode(struct inode *inode); @@ -158,6 +161,8 @@ static inline struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent) {return NULL;} static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, struct proc_dir_entry *parent) { return NULL; } +static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {} +static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {} struct tty_driver; static inline void proc_tty_register_driver(struct tty_driver *driver) {}; -- cgit v1.2.3