]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/linux/devpts_fs.h
Merge tag 'fixes_for_v5.13-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mirror_ubuntu-jammy-kernel.git] / include / linux / devpts_fs.h
CommitLineData
d6910058 1/* SPDX-License-Identifier: GPL-2.0-or-later */
1da177e4
LT
2/* -*- linux-c -*- --------------------------------------------------------- *
3 *
4 * linux/include/linux/devpts_fs.h
5 *
6 * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
7 *
1da177e4
LT
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
eedf265a
EB
17struct pts_fs_info;
18
311fc65c 19struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *);
143c97cc 20struct pts_fs_info *devpts_acquire(struct file *);
eedf265a 21void devpts_release(struct pts_fs_info *);
67245ff3
LT
22
23int devpts_new_index(struct pts_fs_info *);
24void devpts_kill_index(struct pts_fs_info *, int);
25
15f1a633 26/* mknod in devpts */
8ead9dd5 27struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *);
8fcbaa2b 28/* get private structure */
8ead9dd5 29void *devpts_get_priv(struct dentry *);
15f1a633 30/* unlink */
8ead9dd5 31void devpts_pty_kill(struct dentry *);
1da177e4 32
311fc65c
EB
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}
1da177e4
LT
42#endif
43
44
45#endif /* _LINUX_DEVPTS_FS_H */