diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /include/linux/proc_fs.h | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r-- | include/linux/proc_fs.h | 59 |
1 files changed, 16 insertions, 43 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index 32676b35d2f..643b96c7a94 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -28,11 +28,7 @@ struct mm_struct; | |||
28 | */ | 28 | */ |
29 | 29 | ||
30 | enum { | 30 | enum { |
31 | PROC_ROOT_INO = 1, | 31 | PROC_ROOT_INO = 1, |
32 | PROC_IPC_INIT_INO = 0xEFFFFFFFU, | ||
33 | PROC_UTS_INIT_INO = 0xEFFFFFFEU, | ||
34 | PROC_USER_INIT_INO = 0xEFFFFFFDU, | ||
35 | PROC_PID_INIT_INO = 0xEFFFFFFCU, | ||
36 | }; | 32 | }; |
37 | 33 | ||
38 | /* | 34 | /* |
@@ -54,10 +50,10 @@ typedef int (write_proc_t)(struct file *file, const char __user *buffer, | |||
54 | 50 | ||
55 | struct proc_dir_entry { | 51 | struct proc_dir_entry { |
56 | unsigned int low_ino; | 52 | unsigned int low_ino; |
57 | umode_t mode; | 53 | mode_t mode; |
58 | nlink_t nlink; | 54 | nlink_t nlink; |
59 | kuid_t uid; | 55 | uid_t uid; |
60 | kgid_t gid; | 56 | gid_t gid; |
61 | loff_t size; | 57 | loff_t size; |
62 | const struct inode_operations *proc_iops; | 58 | const struct inode_operations *proc_iops; |
63 | /* | 59 | /* |
@@ -110,9 +106,9 @@ extern void proc_root_init(void); | |||
110 | 106 | ||
111 | void proc_flush_task(struct task_struct *task); | 107 | void proc_flush_task(struct task_struct *task); |
112 | 108 | ||
113 | extern struct proc_dir_entry *create_proc_entry(const char *name, umode_t mode, | 109 | extern struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, |
114 | struct proc_dir_entry *parent); | 110 | struct proc_dir_entry *parent); |
115 | struct proc_dir_entry *proc_create_data(const char *name, umode_t mode, | 111 | struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, |
116 | struct proc_dir_entry *parent, | 112 | struct proc_dir_entry *parent, |
117 | const struct file_operations *proc_fops, | 113 | const struct file_operations *proc_fops, |
118 | void *data); | 114 | void *data); |
@@ -150,17 +146,17 @@ extern void proc_device_tree_update_prop(struct proc_dir_entry *pde, | |||
150 | extern struct proc_dir_entry *proc_symlink(const char *, | 146 | extern struct proc_dir_entry *proc_symlink(const char *, |
151 | struct proc_dir_entry *, const char *); | 147 | struct proc_dir_entry *, const char *); |
152 | extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); | 148 | extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *); |
153 | extern struct proc_dir_entry *proc_mkdir_mode(const char *name, umode_t mode, | 149 | extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, |
154 | struct proc_dir_entry *parent); | 150 | struct proc_dir_entry *parent); |
155 | 151 | ||
156 | static inline struct proc_dir_entry *proc_create(const char *name, umode_t mode, | 152 | static inline struct proc_dir_entry *proc_create(const char *name, mode_t mode, |
157 | struct proc_dir_entry *parent, const struct file_operations *proc_fops) | 153 | struct proc_dir_entry *parent, const struct file_operations *proc_fops) |
158 | { | 154 | { |
159 | return proc_create_data(name, mode, parent, proc_fops, NULL); | 155 | return proc_create_data(name, mode, parent, proc_fops, NULL); |
160 | } | 156 | } |
161 | 157 | ||
162 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 158 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, |
163 | umode_t mode, struct proc_dir_entry *base, | 159 | mode_t mode, struct proc_dir_entry *base, |
164 | read_proc_t *read_proc, void * data) | 160 | read_proc_t *read_proc, void * data) |
165 | { | 161 | { |
166 | struct proc_dir_entry *res=create_proc_entry(name,mode,base); | 162 | struct proc_dir_entry *res=create_proc_entry(name,mode,base); |
@@ -172,16 +168,13 @@ static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | |||
172 | } | 168 | } |
173 | 169 | ||
174 | extern struct proc_dir_entry *proc_net_fops_create(struct net *net, | 170 | extern struct proc_dir_entry *proc_net_fops_create(struct net *net, |
175 | const char *name, umode_t mode, const struct file_operations *fops); | 171 | const char *name, mode_t mode, const struct file_operations *fops); |
176 | extern void proc_net_remove(struct net *net, const char *name); | 172 | extern void proc_net_remove(struct net *net, const char *name); |
177 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 173 | extern struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
178 | struct proc_dir_entry *parent); | 174 | struct proc_dir_entry *parent); |
179 | 175 | ||
180 | extern struct file *proc_ns_fget(int fd); | 176 | extern struct file *proc_ns_fget(int fd); |
181 | extern bool proc_ns_inode(struct inode *inode); | ||
182 | 177 | ||
183 | extern int proc_alloc_inum(unsigned int *pino); | ||
184 | extern void proc_free_inum(unsigned int inum); | ||
185 | #else | 178 | #else |
186 | 179 | ||
187 | #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) | 180 | #define proc_net_fops_create(net, name, mode, fops) ({ (void)(mode), NULL; }) |
@@ -192,15 +185,15 @@ static inline void proc_flush_task(struct task_struct *task) | |||
192 | } | 185 | } |
193 | 186 | ||
194 | static inline struct proc_dir_entry *create_proc_entry(const char *name, | 187 | static inline struct proc_dir_entry *create_proc_entry(const char *name, |
195 | umode_t mode, struct proc_dir_entry *parent) { return NULL; } | 188 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } |
196 | static inline struct proc_dir_entry *proc_create(const char *name, | 189 | static inline struct proc_dir_entry *proc_create(const char *name, |
197 | umode_t mode, struct proc_dir_entry *parent, | 190 | mode_t mode, struct proc_dir_entry *parent, |
198 | const struct file_operations *proc_fops) | 191 | const struct file_operations *proc_fops) |
199 | { | 192 | { |
200 | return NULL; | 193 | return NULL; |
201 | } | 194 | } |
202 | static inline struct proc_dir_entry *proc_create_data(const char *name, | 195 | static inline struct proc_dir_entry *proc_create_data(const char *name, |
203 | umode_t mode, struct proc_dir_entry *parent, | 196 | mode_t mode, struct proc_dir_entry *parent, |
204 | const struct file_operations *proc_fops, void *data) | 197 | const struct file_operations *proc_fops, void *data) |
205 | { | 198 | { |
206 | return NULL; | 199 | return NULL; |
@@ -212,10 +205,10 @@ static inline struct proc_dir_entry *proc_symlink(const char *name, | |||
212 | static inline struct proc_dir_entry *proc_mkdir(const char *name, | 205 | static inline struct proc_dir_entry *proc_mkdir(const char *name, |
213 | struct proc_dir_entry *parent) {return NULL;} | 206 | struct proc_dir_entry *parent) {return NULL;} |
214 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, | 207 | static inline struct proc_dir_entry *proc_mkdir_mode(const char *name, |
215 | umode_t mode, struct proc_dir_entry *parent) { return NULL; } | 208 | mode_t mode, struct proc_dir_entry *parent) { return NULL; } |
216 | 209 | ||
217 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, | 210 | static inline struct proc_dir_entry *create_proc_read_entry(const char *name, |
218 | umode_t mode, struct proc_dir_entry *base, | 211 | mode_t mode, struct proc_dir_entry *base, |
219 | read_proc_t *read_proc, void * data) { return NULL; } | 212 | read_proc_t *read_proc, void * data) { return NULL; } |
220 | 213 | ||
221 | struct tty_driver; | 214 | struct tty_driver; |
@@ -236,19 +229,6 @@ static inline struct file *proc_ns_fget(int fd) | |||
236 | return ERR_PTR(-EINVAL); | 229 | return ERR_PTR(-EINVAL); |
237 | } | 230 | } |
238 | 231 | ||
239 | static inline bool proc_ns_inode(struct inode *inode) | ||
240 | { | ||
241 | return false; | ||
242 | } | ||
243 | |||
244 | static inline int proc_alloc_inum(unsigned int *inum) | ||
245 | { | ||
246 | *inum = 1; | ||
247 | return 0; | ||
248 | } | ||
249 | static inline void proc_free_inum(unsigned int inum) | ||
250 | { | ||
251 | } | ||
252 | #endif /* CONFIG_PROC_FS */ | 232 | #endif /* CONFIG_PROC_FS */ |
253 | 233 | ||
254 | #if !defined(CONFIG_PROC_KCORE) | 234 | #if !defined(CONFIG_PROC_KCORE) |
@@ -267,17 +247,13 @@ struct proc_ns_operations { | |||
267 | void *(*get)(struct task_struct *task); | 247 | void *(*get)(struct task_struct *task); |
268 | void (*put)(void *ns); | 248 | void (*put)(void *ns); |
269 | int (*install)(struct nsproxy *nsproxy, void *ns); | 249 | int (*install)(struct nsproxy *nsproxy, void *ns); |
270 | unsigned int (*inum)(void *ns); | ||
271 | }; | 250 | }; |
272 | extern const struct proc_ns_operations netns_operations; | 251 | extern const struct proc_ns_operations netns_operations; |
273 | extern const struct proc_ns_operations utsns_operations; | 252 | extern const struct proc_ns_operations utsns_operations; |
274 | extern const struct proc_ns_operations ipcns_operations; | 253 | extern const struct proc_ns_operations ipcns_operations; |
275 | extern const struct proc_ns_operations pidns_operations; | ||
276 | extern const struct proc_ns_operations userns_operations; | ||
277 | extern const struct proc_ns_operations mntns_operations; | ||
278 | 254 | ||
279 | union proc_op { | 255 | union proc_op { |
280 | int (*proc_get_link)(struct dentry *, struct path *); | 256 | int (*proc_get_link)(struct inode *, struct path *); |
281 | int (*proc_read)(struct task_struct *task, char *page); | 257 | int (*proc_read)(struct task_struct *task, char *page); |
282 | int (*proc_show)(struct seq_file *m, | 258 | int (*proc_show)(struct seq_file *m, |
283 | struct pid_namespace *ns, struct pid *pid, | 259 | struct pid_namespace *ns, struct pid *pid, |
@@ -314,7 +290,4 @@ static inline struct net *PDE_NET(struct proc_dir_entry *pde) | |||
314 | return pde->parent->data; | 290 | return pde->parent->data; |
315 | } | 291 | } |
316 | 292 | ||
317 | #include <linux/signal.h> | ||
318 | |||
319 | void render_sigset_t(struct seq_file *m, const char *header, sigset_t *set); | ||
320 | #endif /* _LINUX_PROC_FS_H */ | 293 | #endif /* _LINUX_PROC_FS_H */ |