~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/proc_fs.h

Version: ~ [ linux-5.4-rc3 ] ~ [ linux-5.3.6 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.79 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.149 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.196 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.196 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.75 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * The proc filesystem constants/structures
  3  */
  4 #ifndef _LINUX_PROC_FS_H
  5 #define _LINUX_PROC_FS_H
  6 
  7 #include <linux/types.h>
  8 #include <linux/fs.h>
  9 
 10 struct proc_dir_entry;
 11 
 12 #ifdef CONFIG_PROC_FS
 13 
 14 extern void proc_root_init(void);
 15 extern void proc_flush_task(struct task_struct *);
 16 
 17 extern struct proc_dir_entry *proc_symlink(const char *,
 18                 struct proc_dir_entry *, const char *);
 19 extern struct proc_dir_entry *proc_mkdir(const char *, struct proc_dir_entry *);
 20 extern struct proc_dir_entry *proc_mkdir_data(const char *, umode_t,
 21                                               struct proc_dir_entry *, void *);
 22 extern struct proc_dir_entry *proc_mkdir_mode(const char *, umode_t,
 23                                               struct proc_dir_entry *);
 24 struct proc_dir_entry *proc_create_mount_point(const char *name);
 25  
 26 extern struct proc_dir_entry *proc_create_data(const char *, umode_t,
 27                                                struct proc_dir_entry *,
 28                                                const struct file_operations *,
 29                                                void *);
 30 
 31 static inline struct proc_dir_entry *proc_create(
 32         const char *name, umode_t mode, struct proc_dir_entry *parent,
 33         const struct file_operations *proc_fops)
 34 {
 35         return proc_create_data(name, mode, parent, proc_fops, NULL);
 36 }
 37 
 38 extern void proc_set_size(struct proc_dir_entry *, loff_t);
 39 extern void proc_set_user(struct proc_dir_entry *, kuid_t, kgid_t);
 40 extern void *PDE_DATA(const struct inode *);
 41 extern void *proc_get_parent_data(const struct inode *);
 42 extern void proc_remove(struct proc_dir_entry *);
 43 extern void remove_proc_entry(const char *, struct proc_dir_entry *);
 44 extern int remove_proc_subtree(const char *, struct proc_dir_entry *);
 45 
 46 #else /* CONFIG_PROC_FS */
 47 
 48 static inline void proc_root_init(void)
 49 {
 50 }
 51 
 52 static inline void proc_flush_task(struct task_struct *task)
 53 {
 54 }
 55 
 56 static inline struct proc_dir_entry *proc_symlink(const char *name,
 57                 struct proc_dir_entry *parent,const char *dest) { return NULL;}
 58 static inline struct proc_dir_entry *proc_mkdir(const char *name,
 59         struct proc_dir_entry *parent) {return NULL;}
 60 static inline struct proc_dir_entry *proc_create_mount_point(const char *name) { return NULL; }
 61 static inline struct proc_dir_entry *proc_mkdir_data(const char *name,
 62         umode_t mode, struct proc_dir_entry *parent, void *data) { return NULL; }
 63 static inline struct proc_dir_entry *proc_mkdir_mode(const char *name,
 64         umode_t mode, struct proc_dir_entry *parent) { return NULL; }
 65 #define proc_create(name, mode, parent, proc_fops) ({NULL;})
 66 #define proc_create_data(name, mode, parent, proc_fops, data) ({NULL;})
 67 
 68 static inline void proc_set_size(struct proc_dir_entry *de, loff_t size) {}
 69 static inline void proc_set_user(struct proc_dir_entry *de, kuid_t uid, kgid_t gid) {}
 70 static inline void *PDE_DATA(const struct inode *inode) {BUG(); return NULL;}
 71 static inline void *proc_get_parent_data(const struct inode *inode) { BUG(); return NULL; }
 72 
 73 static inline void proc_remove(struct proc_dir_entry *de) {}
 74 #define remove_proc_entry(name, parent) do {} while (0)
 75 static inline int remove_proc_subtree(const char *name, struct proc_dir_entry *parent) { return 0; }
 76 
 77 #endif /* CONFIG_PROC_FS */
 78 
 79 struct net;
 80 
 81 static inline struct proc_dir_entry *proc_net_mkdir(
 82         struct net *net, const char *name, struct proc_dir_entry *parent)
 83 {
 84         return proc_mkdir_data(name, 0, parent, net);
 85 }
 86 
 87 struct ns_common;
 88 int open_related_ns(struct ns_common *ns,
 89                    struct ns_common *(*get_ns)(struct ns_common *ns));
 90 
 91 #endif /* _LINUX_PROC_FS_H */
 92 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp