Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
criu
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhul
criu
Commits
48032d87
Commit
48032d87
authored
Feb 18, 2015
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: Introduce TTY_MASTER flag
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
bc535380
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
tty.c
tty.c
+4
-3
No files found.
tty.c
View file @
48032d87
...
@@ -143,6 +143,7 @@ struct tty_type {
...
@@ -143,6 +143,7 @@ struct tty_type {
};
};
#define TTY_PAIR 0x1
#define TTY_PAIR 0x1
#define TTY_MASTER 0x2
static
int
ptm_fd_get_index
(
int
fd
,
const
struct
fd_parms
*
p
)
static
int
ptm_fd_get_index
(
int
fd
,
const
struct
fd_parms
*
p
)
{
{
...
@@ -170,7 +171,7 @@ static int pty_open_ptmx(struct tty_info *info);
...
@@ -170,7 +171,7 @@ static int pty_open_ptmx(struct tty_info *info);
static
struct
tty_type
ptm_type
=
{
static
struct
tty_type
ptm_type
=
{
.
t
=
TTY_TYPE_PTM
,
.
t
=
TTY_TYPE_PTM
,
.
flags
=
TTY_PAIR
,
.
flags
=
TTY_PAIR
|
TTY_MASTER
,
.
name
=
"ptmx"
,
.
name
=
"ptmx"
,
.
img_type
=
TTY_TYPE__PTY
,
.
img_type
=
TTY_TYPE__PTY
,
.
fd_get_index
=
ptm_fd_get_index
,
.
fd_get_index
=
ptm_fd_get_index
,
...
@@ -182,7 +183,7 @@ static int open_simple_tty(struct tty_info *info);
...
@@ -182,7 +183,7 @@ static int open_simple_tty(struct tty_info *info);
static
struct
tty_type
console_type
=
{
static
struct
tty_type
console_type
=
{
.
t
=
TTY_TYPE_CONSOLE
,
.
t
=
TTY_TYPE_CONSOLE
,
.
flags
=
0
,
.
flags
=
TTY_MASTER
,
.
name
=
"console"
,
.
name
=
"console"
,
.
img_type
=
TTY_TYPE__CONSOLE
,
.
img_type
=
TTY_TYPE__CONSOLE
,
.
index
=
CONSOLE_INDEX
,
.
index
=
CONSOLE_INDEX
,
...
@@ -626,7 +627,7 @@ err:
...
@@ -626,7 +627,7 @@ err:
static
bool
tty_is_master
(
struct
tty_info
*
info
)
static
bool
tty_is_master
(
struct
tty_info
*
info
)
{
{
if
(
info
->
type
->
t
==
TTY_TYPE_PTM
||
info
->
type
->
t
==
TTY_TYPE_CONSOLE
)
if
(
info
->
type
->
flags
&
TTY_MASTER
)
return
true
;
return
true
;
if
(
info
->
type
->
t
==
TTY_TYPE_VT
&&
!
opts
.
shell_job
)
if
(
info
->
type
->
t
==
TTY_TYPE_VT
&&
!
opts
.
shell_job
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment