criu/include/tty.h
Andrew Vagin 2245a43393 tty: use a pair of dev and rdev to identify a terminal
We can't use only a terminal device, because we can not distinguish
two pty-s from different mounts in this case.

$ mount -t devpts -o newinstance xxx pts1
$ mount -t devpts -o newinstance xxx pts2
$ stat pts1/0
Device: 27h/39d	Inode: 3           Links: 1     Device type: 88,0
$ stat pts2/0
Device: 28h/40d	Inode: 3           Links: 1     Device type: 88,0

Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2015-12-29 14:47:46 +03:00

34 lines
749 B
C

#ifndef __CR_TTY_H__
#define __CR_TTY_H__
#include <linux/major.h>
#include <linux/vt.h>
#include "files.h"
/* Kernel's limit */
#define TERMIOS_NCC 19
extern const struct fdtype_ops tty_dump_ops;
struct tty_driver;
struct tty_driver *get_tty_driver(dev_t rdev, dev_t dev);
static inline int is_tty(dev_t rdev, dev_t dev)
{
return get_tty_driver(rdev, dev) != NULL;
}
extern int dump_verify_tty_sids(void);
extern struct collect_image_info tty_info_cinfo;
extern struct collect_image_info tty_cinfo;
extern int prepare_shared_tty(void);
extern int tty_setup_slavery(void);
extern int tty_verify_active_pairs(void);
extern int tty_prep_fds(void);
extern void tty_fini_fds(void);
#define OPT_SHELL_JOB "shell-job"
#endif /* __CR_TTY_H__ */