devpts_fs.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  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. int devpts_pty_new(struct tty_struct *tty); /* mknod in devpts */
  17. struct tty_struct *devpts_get_tty(int number); /* get tty structure */
  18. void devpts_pty_kill(int number); /* unlink */
  19. #else
  20. /* Dummy stubs in the no-pty case */
  21. static inline int devpts_pty_new(struct tty_struct *tty) { return -EINVAL; }
  22. static inline struct tty_struct *devpts_get_tty(int number) { return NULL; }
  23. static inline void devpts_pty_kill(int number) { }
  24. #endif
  25. #endif /* _LINUX_DEVPTS_FS_H */