Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux-2.6.git] / include / linux / devpts_fs.h
blob251a2090a55444cec55ce4f04510b6ef83a69cfb
1 /* -*- linux-c -*- --------------------------------------------------------- *
3 * linux/include/linux/devpts_fs.h
5 * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
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.
11 * ------------------------------------------------------------------------- */
13 #ifndef _LINUX_DEVPTS_FS_H
14 #define _LINUX_DEVPTS_FS_H
16 #include <linux/errno.h>
18 #ifdef CONFIG_UNIX98_PTYS
20 int devpts_new_index(struct inode *ptmx_inode);
21 void devpts_kill_index(struct inode *ptmx_inode, int idx);
22 /* mknod in devpts */
23 struct inode *devpts_pty_new(struct inode *ptmx_inode, dev_t device, int index,
24 void *priv);
25 /* get private structure */
26 void *devpts_get_priv(struct inode *pts_inode);
27 /* unlink */
28 void devpts_pty_kill(struct inode *inode);
30 #else
32 /* Dummy stubs in the no-pty case */
33 static inline int devpts_new_index(struct inode *ptmx_inode) { return -EINVAL; }
34 static inline void devpts_kill_index(struct inode *ptmx_inode, int idx) { }
35 static inline struct inode *devpts_pty_new(struct inode *ptmx_inode,
36 dev_t device, int index, void *priv)
38 return ERR_PTR(-EINVAL);
40 static inline void *devpts_get_priv(struct inode *pts_inode)
42 return NULL;
44 static inline void devpts_pty_kill(struct inode *inode) { }
46 #endif
49 #endif /* _LINUX_DEVPTS_FS_H */