aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/tty.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/tty.h')
-rw-r--r--include/linux/tty.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/include/linux/tty.h b/include/linux/tty.h
index f89acd1ed6d3..c75d886b0307 100644
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -318,11 +318,43 @@ struct tty_file_private {
318 318
319#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) 319#define TTY_WRITE_FLUSH(tty) tty_write_flush((tty))
320 320
321#ifdef CONFIG_TTY
322extern void console_init(void);
323extern void tty_kref_put(struct tty_struct *tty);
324extern struct pid *tty_get_pgrp(struct tty_struct *tty);
325extern void tty_vhangup_self(void);
326extern void disassociate_ctty(int priv);
327extern dev_t tty_devnum(struct tty_struct *tty);
328extern void proc_clear_tty(struct task_struct *p);
329extern struct tty_struct *get_current_tty(void);
330/* tty_io.c */
331extern int __init tty_init(void);
332#else
333static inline void console_init(void)
334{ }
335static inline void tty_kref_put(struct tty_struct *tty)
336{ }
337static inline struct pid *tty_get_pgrp(struct tty_struct *tty)
338{ return NULL; }
339static inline void tty_vhangup_self(void)
340{ }
341static inline void disassociate_ctty(int priv)
342{ }
343static inline dev_t tty_devnum(struct tty_struct *tty)
344{ return 0; }
345static inline void proc_clear_tty(struct task_struct *p)
346{ }
347static inline struct tty_struct *get_current_tty(void)
348{ return NULL; }
349/* tty_io.c */
350static inline int __init tty_init(void)
351{ return 0; }
352#endif
353
321extern void tty_write_flush(struct tty_struct *); 354extern void tty_write_flush(struct tty_struct *);
322 355
323extern struct ktermios tty_std_termios; 356extern struct ktermios tty_std_termios;
324 357
325extern void console_init(void);
326extern int vcs_init(void); 358extern int vcs_init(void);
327 359
328extern struct class *tty_class; 360extern struct class *tty_class;
@@ -342,7 +374,6 @@ static inline struct tty_struct *tty_kref_get(struct tty_struct *tty)
342 kref_get(&tty->kref); 374 kref_get(&tty->kref);
343 return tty; 375 return tty;
344} 376}
345extern void tty_kref_put(struct tty_struct *tty);
346 377
347extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, 378extern int tty_paranoia_check(struct tty_struct *tty, struct inode *inode,
348 const char *routine); 379 const char *routine);
@@ -374,18 +405,15 @@ extern void tty_driver_remove_tty(struct tty_driver *driver,
374 struct tty_struct *tty); 405 struct tty_struct *tty);
375extern void tty_free_termios(struct tty_struct *tty); 406extern void tty_free_termios(struct tty_struct *tty);
376extern int is_current_pgrp_orphaned(void); 407extern int is_current_pgrp_orphaned(void);
377extern struct pid *tty_get_pgrp(struct tty_struct *tty);
378extern int is_ignored(int sig); 408extern int is_ignored(int sig);
379extern int tty_signal(int sig, struct tty_struct *tty); 409extern int tty_signal(int sig, struct tty_struct *tty);
380extern void tty_hangup(struct tty_struct *tty); 410extern void tty_hangup(struct tty_struct *tty);
381extern void tty_vhangup(struct tty_struct *tty); 411extern void tty_vhangup(struct tty_struct *tty);
382extern void tty_vhangup_locked(struct tty_struct *tty); 412extern void tty_vhangup_locked(struct tty_struct *tty);
383extern void tty_vhangup_self(void);
384extern void tty_unhangup(struct file *filp); 413extern void tty_unhangup(struct file *filp);
385extern int tty_hung_up_p(struct file *filp); 414extern int tty_hung_up_p(struct file *filp);
386extern void do_SAK(struct tty_struct *tty); 415extern void do_SAK(struct tty_struct *tty);
387extern void __do_SAK(struct tty_struct *tty); 416extern void __do_SAK(struct tty_struct *tty);
388extern void disassociate_ctty(int priv);
389extern void no_tty(void); 417extern void no_tty(void);
390extern void tty_flush_to_ldisc(struct tty_struct *tty); 418extern void tty_flush_to_ldisc(struct tty_struct *tty);
391extern void tty_buffer_free_all(struct tty_port *port); 419extern void tty_buffer_free_all(struct tty_port *port);
@@ -415,9 +443,6 @@ extern long tty_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
415extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file, 443extern int tty_mode_ioctl(struct tty_struct *tty, struct file *file,
416 unsigned int cmd, unsigned long arg); 444 unsigned int cmd, unsigned long arg);
417extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg); 445extern int tty_perform_flush(struct tty_struct *tty, unsigned long arg);
418extern dev_t tty_devnum(struct tty_struct *tty);
419extern void proc_clear_tty(struct task_struct *p);
420extern struct tty_struct *get_current_tty(void);
421extern void tty_default_fops(struct file_operations *fops); 446extern void tty_default_fops(struct file_operations *fops);
422extern struct tty_struct *alloc_tty_struct(void); 447extern struct tty_struct *alloc_tty_struct(void);
423extern int tty_alloc_file(struct file *file); 448extern int tty_alloc_file(struct file *file);
@@ -543,9 +568,6 @@ static inline int tty_audit_push_task(struct task_struct *tsk,
543} 568}
544#endif 569#endif
545 570
546/* tty_io.c */
547extern int __init tty_init(void);
548
549/* tty_ioctl.c */ 571/* tty_ioctl.c */
550extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file, 572extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
551 unsigned int cmd, unsigned long arg); 573 unsigned int cmd, unsigned long arg);