diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-19 19:36:18 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-04-19 19:36:18 -0400 |
| commit | 9a0e3eea25d3ab267aff9d4eaed83fbe46d989d0 (patch) | |
| tree | ecd334957a0c62bcd4fe2fe9feea53ba9a6905cf /include/linux/devpts_fs.h | |
| parent | 12566cc35d0e68308bde7aad615743d560cb097b (diff) | |
| parent | 67245ff332064c01b760afa7a384ccda024bfd24 (diff) | |
Merge branch 'ptmx-cleanup'
Merge the ptmx internal interface cleanup branch.
This doesn't change semantics, but it should be a sane basis for
eventually getting the multi-instance devpts code into some sane shape
where we can get rid of the kernel config option. Which we can
hopefully get done next merge window..
* ptmx-cleanup:
devpts: clean up interface to pty drivers
Diffstat (limited to 'include/linux/devpts_fs.h')
| -rw-r--r-- | include/linux/devpts_fs.h | 34 |
1 files changed, 10 insertions, 24 deletions
diff --git a/include/linux/devpts_fs.h b/include/linux/devpts_fs.h index e0ee0b3000b2..358a4db72a27 100644 --- a/include/linux/devpts_fs.h +++ b/include/linux/devpts_fs.h | |||
| @@ -15,38 +15,24 @@ | |||
| 15 | 15 | ||
| 16 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
| 17 | 17 | ||
| 18 | struct pts_fs_info; | ||
| 19 | |||
| 18 | #ifdef CONFIG_UNIX98_PTYS | 20 | #ifdef CONFIG_UNIX98_PTYS |
| 19 | 21 | ||
| 20 | int devpts_new_index(struct inode *ptmx_inode); | 22 | /* Look up a pts fs info and get a ref to it */ |
| 21 | void devpts_kill_index(struct inode *ptmx_inode, int idx); | 23 | struct pts_fs_info *devpts_get_ref(struct inode *, struct file *); |
| 22 | void devpts_add_ref(struct inode *ptmx_inode); | 24 | void devpts_put_ref(struct pts_fs_info *); |
| 23 | void devpts_del_ref(struct inode *ptmx_inode); | 25 | |
| 26 | int devpts_new_index(struct pts_fs_info *); | ||
| 27 | void devpts_kill_index(struct pts_fs_info *, int); | ||
| 28 | |||
| 24 | /* mknod in devpts */ | 29 | /* mknod in devpts */ |
| 25 | struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index, | 30 | struct inode *devpts_pty_new(struct pts_fs_info *, dev_t, int, void *); |
| 26 | void *priv); | ||
| 27 | /* get private structure */ | 31 | /* get private structure */ |
| 28 | void *devpts_get_priv(struct inode *pts_inode); | 32 | void *devpts_get_priv(struct inode *pts_inode); |
| 29 | /* unlink */ | 33 | /* unlink */ |
| 30 | void devpts_pty_kill(struct inode *inode); | 34 | void devpts_pty_kill(struct inode *inode); |
| 31 | 35 | ||
| 32 | #else | ||
| 33 | |||
| 34 | /* Dummy stubs in the no-pty case */ | ||
| 35 | static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; } | ||
| 36 | static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { } | ||
| 37 | static inline void devpts_add_ref(struct inode *ptmx_inode) { } | ||
| 38 | static inline void devpts_del_ref(struct inode *ptmx_inode) { } | ||
| 39 | static inline struct inode *devpts_pty_new(struct inode *ptmx_inode, | ||
| 40 | dev_t device, int index, void *priv) | ||
| 41 | { | ||
| 42 | return ERR_PTR(-EINVAL); | ||
| 43 | } | ||
| 44 | static inline void *devpts_get_priv(struct inode *pts_inode) | ||
| 45 | { | ||
| 46 | return NULL; | ||
| 47 | } | ||
| 48 | static inline void devpts_pty_kill(struct inode *inode) { } | ||
| 49 | |||
| 50 | #endif | 36 | #endif |
| 51 | 37 | ||
| 52 | 38 | ||
