blob: 5871f292b596fb58349c1f4c6e0202aede55b7f8 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/* -*- 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
Linus Torvalds67245ff2016-04-16 15:16:07 -070018struct pts_fs_info;
19
Linus Torvalds1da177e2005-04-16 15:20:36 -070020#ifdef CONFIG_UNIX98_PTYS
21
Linus Torvalds67245ff2016-04-16 15:16:07 -070022/* Look up a pts fs info and get a ref to it */
23struct pts_fs_info *devpts_get_ref(struct inode *, struct file *);
24void devpts_put_ref(struct pts_fs_info *);
25
26int devpts_new_index(struct pts_fs_info *);
27void devpts_kill_index(struct pts_fs_info *, int);
28
Sukadev Bhattiprolu15f1a632008-10-13 10:42:59 +010029/* mknod in devpts */
Linus Torvalds8ead9dd2016-04-25 20:04:08 -070030struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *);
Jiri Slaby8fcbaa22012-10-18 22:26:27 +020031/* get private structure */
Linus Torvalds8ead9dd2016-04-25 20:04:08 -070032void *devpts_get_priv(struct dentry *);
Sukadev Bhattiprolu15f1a632008-10-13 10:42:59 +010033/* unlink */
Linus Torvalds8ead9dd2016-04-25 20:04:08 -070034void devpts_pty_kill(struct dentry *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070035
Linus Torvalds1da177e2005-04-16 15:20:36 -070036#endif
37
38
39#endif /* _LINUX_DEVPTS_FS_H */