2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-30 22:05:36 +00:00

files: Pass pstree_item argument to clone_service_fd()

Refactoring for next patches.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
Kirill Tkhai
2018-01-10 17:02:27 +03:00
committed by Andrei Vagin
parent 72c1c1a6ab
commit dfb7705df0
3 changed files with 6 additions and 4 deletions

View File

@@ -1035,7 +1035,7 @@ static int restore_one_zombie(CoreEntry *core)
static int setup_newborn_fds(struct pstree_item *me)
{
if (clone_service_fd(rsti(me)->service_fd_id))
if (clone_service_fd(me))
return -1;
if (!me->parent ||

View File

@@ -30,7 +30,7 @@ struct pstree_item;
extern bool sfds_protected;
extern void set_proc_self_fd(int fd);
extern int clone_service_fd(int id);
extern int clone_service_fd(struct pstree_item *me);
extern int init_service_fd(void);
extern int get_service_fd(enum sfd_type type);
extern int install_service_fd(enum sfd_type type, int fd);

View File

@@ -542,9 +542,11 @@ int close_service_fd(enum sfd_type type)
return 0;
}
int clone_service_fd(int id)
int clone_service_fd(struct pstree_item *me)
{
int ret = -1, i;
int id, i, ret = -1;
id = rsti(me)->service_fd_id;
if (service_fd_id == id)
return 0;