Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* -*- linux-c -*- --------------------------------------------------------- * |
| 2 | * |
| 3 | * linux/include/linux/devpts_fs.h |
| 4 | * |
| 5 | * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved |
| 6 | * |
| 7 | * This file is part of the Linux kernel and is made available under |
| 8 | * the terms of the GNU General Public License, version 2, or at your |
| 9 | * option, any later version, incorporated herein by reference. |
| 10 | * |
| 11 | * ------------------------------------------------------------------------- */ |
| 12 | |
| 13 | #ifndef _LINUX_DEVPTS_FS_H |
| 14 | #define _LINUX_DEVPTS_FS_H |
| 15 | |
| 16 | #include <linux/errno.h> |
| 17 | |
| 18 | #ifdef CONFIG_UNIX98_PTYS |
| 19 | |
Eric W. Biederman | eedf265 | 2016-06-02 10:29:47 -0500 | [diff] [blame] | 20 | struct pts_fs_info; |
| 21 | |
Eric W. Biederman | 311fc65 | 2017-08-24 15:13:29 -0500 | [diff] [blame] | 22 | struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *); |
Linus Torvalds | 143c97c | 2017-08-23 18:16:11 -0700 | [diff] [blame] | 23 | struct pts_fs_info *devpts_acquire(struct file *); |
Eric W. Biederman | eedf265 | 2016-06-02 10:29:47 -0500 | [diff] [blame] | 24 | void devpts_release(struct pts_fs_info *); |
Linus Torvalds | 67245ff | 2016-04-16 15:16:07 -0700 | [diff] [blame] | 25 | |
| 26 | int devpts_new_index(struct pts_fs_info *); |
| 27 | void devpts_kill_index(struct pts_fs_info *, int); |
| 28 | |
Sukadev Bhattiprolu | 15f1a63 | 2008-10-13 10:42:59 +0100 | [diff] [blame] | 29 | /* mknod in devpts */ |
Linus Torvalds | 8ead9dd | 2016-04-25 20:04:08 -0700 | [diff] [blame] | 30 | struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *); |
Jiri Slaby | 8fcbaa2 | 2012-10-18 22:26:27 +0200 | [diff] [blame] | 31 | /* get private structure */ |
Linus Torvalds | 8ead9dd | 2016-04-25 20:04:08 -0700 | [diff] [blame] | 32 | void *devpts_get_priv(struct dentry *); |
Sukadev Bhattiprolu | 15f1a63 | 2008-10-13 10:42:59 +0100 | [diff] [blame] | 33 | /* unlink */ |
Linus Torvalds | 8ead9dd | 2016-04-25 20:04:08 -0700 | [diff] [blame] | 34 | void devpts_pty_kill(struct dentry *); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | |
Eric W. Biederman | 311fc65 | 2017-08-24 15:13:29 -0500 | [diff] [blame] | 36 | /* in pty.c */ |
| 37 | int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags); |
| 38 | |
| 39 | #else |
| 40 | static inline int |
| 41 | ptm_open_peer(struct file *master, struct tty_struct *tty, int flags) |
| 42 | { |
| 43 | return -EIO; |
| 44 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 45 | #endif |
| 46 | |
| 47 | |
| 48 | #endif /* _LINUX_DEVPTS_FS_H */ |