summaryrefslogtreecommitdiffstats
path: root/fs/proc/internal.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 13:00:01 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2018-06-04 13:00:01 -0400
commitcf626b0da78df6669c6b5f51ddd9a70a0702e579 (patch)
tree45d29a4cb7574aed7f140814ed22088ded21c291 /fs/proc/internal.h
parent9c50eafc32ddbd166c8a2bbaecd4ad201c452b14 (diff)
parent5ef03dbd91855544cd4c7c1910c3ef5226ee87e8 (diff)
Merge branch 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull procfs updates from Al Viro: "Christoph's proc_create_... cleanups series" * 'hch.procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (44 commits) xfs, proc: hide unused xfs procfs helpers isdn/gigaset: add back gigaset_procinfo assignment proc: update SIZEOF_PDE_INLINE_NAME for the new pde fields tty: replace ->proc_fops with ->proc_show ide: replace ->proc_fops with ->proc_show ide: remove ide_driver_proc_write isdn: replace ->proc_fops with ->proc_show atm: switch to proc_create_seq_private atm: simplify procfs code bluetooth: switch to proc_create_seq_data netfilter/x_tables: switch to proc_create_seq_private netfilter/xt_hashlimit: switch to proc_create_{seq,single}_data neigh: switch to proc_create_seq_data hostap: switch to proc_create_{seq,single}_data bonding: switch to proc_create_seq_data rtc/proc: switch to proc_create_single_data drbd: switch to proc_create_single resource: switch to proc_create_seq_data staging/rtl8192u: simplify procfs code jfs: simplify procfs code ...
Diffstat (limited to 'fs/proc/internal.h')
-rw-r--r--fs/proc/internal.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/proc/internal.h b/fs/proc/internal.h
index 0f1692e63cb6..a318ae5b36b4 100644
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@ -44,7 +44,12 @@ struct proc_dir_entry {
44 struct completion *pde_unload_completion; 44 struct completion *pde_unload_completion;
45 const struct inode_operations *proc_iops; 45 const struct inode_operations *proc_iops;
46 const struct file_operations *proc_fops; 46 const struct file_operations *proc_fops;
47 union {
48 const struct seq_operations *seq_ops;
49 int (*single_show)(struct seq_file *, void *);
50 };
47 void *data; 51 void *data;
52 unsigned int state_size;
48 unsigned int low_ino; 53 unsigned int low_ino;
49 nlink_t nlink; 54 nlink_t nlink;
50 kuid_t uid; 55 kuid_t uid;
@@ -57,9 +62,9 @@ struct proc_dir_entry {
57 umode_t mode; 62 umode_t mode;
58 u8 namelen; 63 u8 namelen;
59#ifdef CONFIG_64BIT 64#ifdef CONFIG_64BIT
60#define SIZEOF_PDE_INLINE_NAME (192-139) 65#define SIZEOF_PDE_INLINE_NAME (192-155)
61#else 66#else
62#define SIZEOF_PDE_INLINE_NAME (128-87) 67#define SIZEOF_PDE_INLINE_NAME (128-95)
63#endif 68#endif
64 char inline_name[SIZEOF_PDE_INLINE_NAME]; 69 char inline_name[SIZEOF_PDE_INLINE_NAME];
65} __randomize_layout; 70} __randomize_layout;
@@ -162,6 +167,10 @@ extern bool proc_fill_cache(struct file *, struct dir_context *, const char *, i
162/* 167/*
163 * generic.c 168 * generic.c
164 */ 169 */
170struct proc_dir_entry *proc_create_reg(const char *name, umode_t mode,
171 struct proc_dir_entry **parent, void *data);
172struct proc_dir_entry *proc_register(struct proc_dir_entry *dir,
173 struct proc_dir_entry *dp);
165extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int); 174extern struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
166struct dentry *proc_lookup_de(struct inode *, struct dentry *, struct proc_dir_entry *); 175struct dentry *proc_lookup_de(struct inode *, struct dentry *, struct proc_dir_entry *);
167extern int proc_readdir(struct file *, struct dir_context *); 176extern int proc_readdir(struct file *, struct dir_context *);