1/* SPDX-License-Identifier: GPL-2.0-or-later */
2/* -*- linux-c -*- --------------------------------------------------------- *
3 *
4 * linux/include/linux/devpts_fs.h
5 *
6 * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
7 *
8 * ------------------------------------------------------------------------- */
9
10#ifndef _LINUX_DEVPTS_FS_H
11#define _LINUX_DEVPTS_FS_H
12
13#include <linux/errno.h>
14
15#ifdef CONFIG_UNIX98_PTYS
16
17struct pts_fs_info;
18
19struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *);
20struct pts_fs_info *devpts_acquire(struct file *);
21void devpts_release(struct pts_fs_info *);
22
23int devpts_new_index(struct pts_fs_info *);
24void devpts_kill_index(struct pts_fs_info *, int);
25
26/* mknod in devpts */
27struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *);
28/* get private structure */
29void *devpts_get_priv(struct dentry *);
30/* unlink */
31void devpts_pty_kill(struct dentry *);
32
33/* in pty.c */
34int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags);
35
36#else
37static inline int
38ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
39{
40 return -EIO;
41}
42#endif
43
44
45#endif /* _LINUX_DEVPTS_FS_H */
46

source code of linux/include/linux/devpts_fs.h