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
d47975b5
Commit
d47975b5
authored
Feb 18, 2015
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: Move image type onto tty_type
Signed-off-by:
Pavel Emelyanov
<
xemul@parallels.com
>
parent
3b913082
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
17 deletions
+10
-17
tty.c
tty.c
+10
-17
No files found.
tty.c
View file @
d47975b5
...
@@ -135,6 +135,7 @@ struct tty_type {
...
@@ -135,6 +135,7 @@ struct tty_type {
int
t
;
int
t
;
char
*
name
;
char
*
name
;
int
index
;
int
index
;
int
img_type
;
unsigned
flags
;
unsigned
flags
;
int
(
*
fd_get_index
)(
int
fd
,
const
struct
fd_parms
*
);
int
(
*
fd_get_index
)(
int
fd
,
const
struct
fd_parms
*
);
int
(
*
img_get_index
)(
struct
tty_info
*
ti
);
int
(
*
img_get_index
)(
struct
tty_info
*
ti
);
...
@@ -171,6 +172,7 @@ static struct tty_type ptm_type = {
...
@@ -171,6 +172,7 @@ static struct tty_type ptm_type = {
.
t
=
TTY_TYPE_PTM
,
.
t
=
TTY_TYPE_PTM
,
.
flags
=
TTY_PAIR
,
.
flags
=
TTY_PAIR
,
.
name
=
"ptmx"
,
.
name
=
"ptmx"
,
.
img_type
=
TTY_TYPE__PTY
,
.
fd_get_index
=
ptm_fd_get_index
,
.
fd_get_index
=
ptm_fd_get_index
,
.
img_get_index
=
pty_get_index
,
.
img_get_index
=
pty_get_index
,
.
open
=
pty_open_ptmx
,
.
open
=
pty_open_ptmx
,
...
@@ -182,6 +184,7 @@ static struct tty_type console_type = {
...
@@ -182,6 +184,7 @@ static struct tty_type console_type = {
.
t
=
TTY_TYPE_CONSOLE
,
.
t
=
TTY_TYPE_CONSOLE
,
.
flags
=
0
,
.
flags
=
0
,
.
name
=
"console"
,
.
name
=
"console"
,
.
img_type
=
TTY_TYPE__CONSOLE
,
.
index
=
CONSOLE_INDEX
,
.
index
=
CONSOLE_INDEX
,
.
open
=
open_simple_tty
,
.
open
=
open_simple_tty
,
};
};
...
@@ -190,6 +193,7 @@ static struct tty_type vt_type = {
...
@@ -190,6 +193,7 @@ static struct tty_type vt_type = {
.
t
=
TTY_TYPE_VT
,
.
t
=
TTY_TYPE_VT
,
.
flags
=
0
,
.
flags
=
0
,
.
name
=
"vt"
,
.
name
=
"vt"
,
.
img_type
=
TTY_TYPE__VT
,
.
index
=
VT_INDEX
,
.
index
=
VT_INDEX
,
.
open
=
open_simple_tty
,
.
open
=
open_simple_tty
,
};
};
...
@@ -218,6 +222,7 @@ static struct tty_type pts_type = {
...
@@ -218,6 +222,7 @@ static struct tty_type pts_type = {
.
t
=
TTY_TYPE_PTS
,
.
t
=
TTY_TYPE_PTS
,
.
flags
=
TTY_PAIR
,
.
flags
=
TTY_PAIR
,
.
name
=
"pts"
,
.
name
=
"pts"
,
.
img_type
=
TTY_TYPE__PTY
,
.
fd_get_index
=
pts_fd_get_index
,
.
fd_get_index
=
pts_fd_get_index
,
.
img_get_index
=
pty_get_index
,
.
img_get_index
=
pty_get_index
,
.
open
=
pty_open_ptmx
,
.
open
=
pty_open_ptmx
,
...
@@ -1438,28 +1443,16 @@ static int dump_tty_info(int lfd, u32 id, const struct fd_parms *p, struct tty_t
...
@@ -1438,28 +1443,16 @@ static int dump_tty_info(int lfd, u32 id, const struct fd_parms *p, struct tty_t
info
.
sid
=
pti
->
sid
;
info
.
sid
=
pti
->
sid
;
info
.
pgrp
=
pti
->
pgrp
;
info
.
pgrp
=
pti
->
pgrp
;
info
.
rdev
=
p
->
stat
.
st_rdev
;
info
.
rdev
=
p
->
stat
.
st_rdev
;
info
.
locked
=
pti
->
st_lock
;
info
.
exclusive
=
pti
->
st_excl
;
info
.
packet_mode
=
pti
->
st_pckt
;
switch
(
type
->
t
)
{
info
.
type
=
type
->
img_type
;
case
TTY_TYPE_PTM
:
if
(
info
.
type
==
TTY_TYPE__PTY
)
{
case
TTY_TYPE_PTS
:
info
.
type
=
TTY_TYPE__PTY
;
info
.
pty
=
&
pty
;
info
.
pty
=
&
pty
;
pty
.
index
=
index
;
pty
.
index
=
index
;
break
;
case
TTY_TYPE_CONSOLE
:
info
.
type
=
TTY_TYPE__CONSOLE
;
break
;
case
TTY_TYPE_VT
:
info
.
type
=
TTY_TYPE__VT
;
break
;
default:
BUG
();
}
}
info
.
locked
=
pti
->
st_lock
;
info
.
exclusive
=
pti
->
st_excl
;
info
.
packet_mode
=
pti
->
st_pckt
;
/*
/*
* Nothing we can do on hanging up terminal,
* Nothing we can do on hanging up terminal,
* just write out minimum information we can
* just write out minimum information we can
...
...
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