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
347d670f
Commit
347d670f
authored
Mar 24, 2016
by
Pavel Emelyanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tty: Setup tty slavery via post_cb engine
Signed-off-by:
Pavel Emelyanov
<
xemul@virtuozzo.com
>
parent
92eb5ff5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
6 deletions
+11
-6
cr-restore.c
criu/cr-restore.c
+0
-4
tty.h
criu/include/tty.h
+0
-1
tty.c
criu/tty.c
+11
-1
No files found.
criu/cr-restore.c
View file @
347d670f
...
@@ -268,10 +268,6 @@ static int root_prepare_shared(void)
...
@@ -268,10 +268,6 @@ static int root_prepare_shared(void)
if
(
ret
<
0
)
if
(
ret
<
0
)
goto
err
;
goto
err
;
ret
=
tty_setup_slavery
();
if
(
ret
)
goto
err
;
ret
=
prepare_restorer_blob
();
ret
=
prepare_restorer_blob
();
if
(
ret
)
if
(
ret
)
goto
err
;
goto
err
;
...
...
criu/include/tty.h
View file @
347d670f
...
@@ -22,7 +22,6 @@ extern int dump_verify_tty_sids(void);
...
@@ -22,7 +22,6 @@ extern int dump_verify_tty_sids(void);
extern
struct
collect_image_info
tty_info_cinfo
;
extern
struct
collect_image_info
tty_info_cinfo
;
extern
struct
collect_image_info
tty_cinfo
;
extern
struct
collect_image_info
tty_cinfo
;
extern
int
prepare_shared_tty
(
void
);
extern
int
prepare_shared_tty
(
void
);
extern
int
tty_setup_slavery
(
void
);
extern
int
tty_verify_active_pairs
(
void
);
extern
int
tty_verify_active_pairs
(
void
);
...
...
criu/tty.c
View file @
347d670f
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
#include "compiler.h"
#include "compiler.h"
#include "asm/types.h"
#include "asm/types.h"
#include "crtools.h"
#include "files.h"
#include "files.h"
#include "cr_options.h"
#include "cr_options.h"
#include "imgset.h"
#include "imgset.h"
...
@@ -1221,7 +1222,7 @@ static int tty_setup_orphan_slavery(void)
...
@@ -1221,7 +1222,7 @@ static int tty_setup_orphan_slavery(void)
return
0
;
return
0
;
}
}
int
tty_setup_slavery
(
voi
d
)
static
int
tty_setup_slavery
(
void
*
unuse
d
)
{
{
struct
tty_info
*
info
,
*
peer
,
*
m
;
struct
tty_info
*
info
,
*
peer
,
*
m
;
...
@@ -1452,6 +1453,15 @@ static int collect_one_tty(void *obj, ProtobufCMessage *msg)
...
@@ -1452,6 +1453,15 @@ static int collect_one_tty(void *obj, ProtobufCMessage *msg)
pr_info
(
"Collected tty ID %#x (%s)
\n
"
,
info
->
tfe
->
id
,
info
->
driver
->
name
);
pr_info
(
"Collected tty ID %#x (%s)
\n
"
,
info
->
tfe
->
id
,
info
->
driver
->
name
);
if
(
list_empty
(
&
all_ttys
))
/*
* XXX -- not every tty requires this.
* Check that we have such here and queue
* post-cb only if required.
*/
if
(
add_post_prepare_cb
(
tty_setup_slavery
,
NULL
))
return
-
1
;
list_add
(
&
info
->
list
,
&
all_ttys
);
list_add
(
&
info
->
list
,
&
all_ttys
);
return
file_desc_add
(
&
info
->
d
,
info
->
tfe
->
id
,
&
tty_desc_ops
);
return
file_desc_add
(
&
info
->
d
,
info
->
tfe
->
id
,
&
tty_desc_ops
);
}
}
...
...
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