devpts_fs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /* -*- linux-c -*- --------------------------------------------------------- *
  3. *
  4. * linux/include/linux/devpts_fs.h
  5. *
  6. * Copyright 1998-2004 H. Peter Anvin -- All Rights Reserved
  7. *
  8. * ------------------------------------------------------------------------- */
  9. #ifndef _LINUX_DEVPTS_FS_H
  10. #define _LINUX_DEVPTS_FS_H
  11. #include <linux/errno.h>
  12. #ifdef CONFIG_UNIX98_PTYS
  13. struct pts_fs_info;
  14. struct vfsmount *devpts_mntget(struct file *, struct pts_fs_info *);
  15. struct pts_fs_info *devpts_acquire(struct file *);
  16. void devpts_release(struct pts_fs_info *);
  17. int devpts_new_index(struct pts_fs_info *);
  18. void devpts_kill_index(struct pts_fs_info *, int);
  19. /* mknod in devpts */
  20. struct dentry *devpts_pty_new(struct pts_fs_info *, int, void *);
  21. /* get private structure */
  22. void *devpts_get_priv(struct dentry *);
  23. /* unlink */
  24. void devpts_pty_kill(struct dentry *);
  25. /* in pty.c */
  26. int ptm_open_peer(struct file *master, struct tty_struct *tty, int flags);
  27. #else
  28. static inline int
  29. ptm_open_peer(struct file *master, struct tty_struct *tty, int flags)
  30. {
  31. return -EIO;
  32. }
  33. #endif
  34. #endif /* _LINUX_DEVPTS_FS_H */