devpts_fs.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. #ifndef _LINUX_DEVPTS_FS_H
  13. #define _LINUX_DEVPTS_FS_H
  14. #include <linux/errno.h>
  15. #ifdef CONFIG_UNIX98_PTYS
  16. struct pts_fs_info;
  17. struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *);
  18. struct pts_fs_info *devpts_acquire(struct file *);
  19. void devpts_release(struct pts_fs_info *);
  20. int devpts_new_index(struct pts_fs_info *);
  21. void devpts_kill_index(struct pts_fs_info *, int);
  22. /* mknod in devpts */
  23. struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *);
  24. /* get private structure */
  25. void *devpts_get_priv(struct dentry *);
  26. /* unlink */
  27. void devpts_pty_kill(struct dentry *);
  28. /* in pty.c */
  29. int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags);
  30. #else
  31. static inline int
  32. ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
  33. {
  34. return -EIO;
  35. }
  36. #endif
  37. #endif /* _LINUX_DEVPTS_FS_H */