Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /* -*- linux-c -*- --------------------------------------------------------- *
0003  *
0004  * linux/include/linux/devpts_fs.h
0005  *
0006  *  Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
0007  *
0008  * ------------------------------------------------------------------------- */
0009 
0010 #ifndef _LINUX_DEVPTS_FS_H
0011 #define _LINUX_DEVPTS_FS_H
0012 
0013 #include <linux/errno.h>
0014 
0015 #ifdef CONFIG_UNIX98_PTYS
0016 
0017 struct pts_fs_info;
0018 
0019 struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *);
0020 struct pts_fs_info *devpts_acquire(struct file *);
0021 void devpts_release(struct pts_fs_info *);
0022 
0023 int devpts_new_index(struct pts_fs_info *);
0024 void devpts_kill_index(struct pts_fs_info *, int);
0025 
0026 /* mknod in devpts */
0027 struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *);
0028 /* get private structure */
0029 void *devpts_get_priv(struct dentry *);
0030 /* unlink */
0031 void devpts_pty_kill(struct dentry *);
0032 
0033 /* in pty.c */
0034 int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags);
0035 
0036 #else
0037 static inline int
0038 ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
0039 {
0040     return -EIO;
0041 }
0042 #endif
0043 
0044 
0045 #endif /* _LINUX_DEVPTS_FS_H */