diff options
| author | Johannes Berg <johannes.berg@intel.com> | 2012-10-15 17:20:54 +0200 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-15 17:20:54 +0200 |
| commit | df9b42963f2d010ae3163a894ce22cf6b27cd344 (patch) | |
| tree | f42f826d9bb975766c1a79986c39e64c9a900908 /include/linux/seq_file.h | |
| parent | 33766368f6532313571534f9112b1796d6651bbe (diff) | |
| parent | c3e7724b6bc2f25e46c38dbe68f09d71fafeafb8 (diff) | |
Merge remote-tracking branch 'wireless/master' into mac80211
Diffstat (limited to 'include/linux/seq_file.h')
| -rw-r--r-- | include/linux/seq_file.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/seq_file.h b/include/linux/seq_file.h index fc61854f6224..68a04a343cad 100644 --- a/include/linux/seq_file.h +++ b/include/linux/seq_file.h @@ -13,6 +13,7 @@ struct file; struct path; struct inode; struct dentry; +struct user_namespace; struct seq_file { char *buf; @@ -25,6 +26,9 @@ struct seq_file { struct mutex lock; const struct seq_operations *op; int poll_event; +#ifdef CONFIG_USER_NS + struct user_namespace *user_ns; +#endif void *private; }; @@ -86,6 +90,7 @@ int seq_puts(struct seq_file *m, const char *s); int seq_write(struct seq_file *seq, const void *data, size_t len); __printf(2, 3) int seq_printf(struct seq_file *, const char *, ...); +__printf(2, 0) int seq_vprintf(struct seq_file *, const char *, va_list args); int seq_path(struct seq_file *, const struct path *, const char *); int seq_dentry(struct seq_file *, struct dentry *, const char *); @@ -127,6 +132,16 @@ int seq_put_decimal_ull(struct seq_file *m, char delimiter, int seq_put_decimal_ll(struct seq_file *m, char delimiter, long long num); +static inline struct user_namespace *seq_user_ns(struct seq_file *seq) +{ +#ifdef CONFIG_USER_NS + return seq->user_ns; +#else + extern struct user_namespace init_user_ns; + return &init_user_ns; +#endif +} + #define SEQ_START_TOKEN ((void *)1) /* * Helpers for iteration over list_head-s in seq_files |
