TTY: devpts, don't care about TTY in devpts_get_tty
[deliverable/linux.git] / include / linux / devpts_fs.h
CommitLineData
1da177e4
LT
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
15f1a633
SB
20int devpts_new_index(struct inode *ptmx_inode);
21void devpts_kill_index(struct inode *ptmx_inode, int idx);
22/* mknod in devpts */
23int devpts_pty_new(struct inode *ptmx_inode, struct tty_struct *tty);
8fcbaa2b
JS
24/* get private structure */
25void *devpts_get_priv(struct inode *pts_inode);
15f1a633
SB
26/* unlink */
27void devpts_pty_kill(struct tty_struct *tty);
1da177e4
LT
28
29#else
30
31/* Dummy stubs in the no-pty case */
15f1a633
SB
32static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; }
33static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { }
34static inline int devpts_pty_new(struct inode *ptmx_inode,
35 struct tty_struct *tty)
36{
37 return -EINVAL;
38}
8fcbaa2b 39static inline void *devpts_get_priv(struct inode *pts_inode)
15f1a633
SB
40{
41 return NULL;
42}
43static inline void devpts_pty_kill(struct tty_struct *tty) { }
1da177e4
LT
44
45#endif
46
47
48#endif /* _LINUX_DEVPTS_FS_H */
This page took 0.760767 seconds and 5 git commands to generate.