mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-28 12:57:57 +00:00
tty: Generate unique ID for satellite regfile entry
Same thing as for fifo-s. Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
c0e929abc5
commit
d4c6e78515
18
criu/tty.c
18
criu/tty.c
@ -1626,7 +1626,8 @@ static int tty_info_setup(struct tty_info *info)
|
|||||||
* reg file rectord because they are inherited from
|
* reg file rectord because they are inherited from
|
||||||
* command line on restore.
|
* command line on restore.
|
||||||
*/
|
*/
|
||||||
info->reg_d = try_collect_special_file(info->tfe->id, 1);
|
info->reg_d = try_collect_special_file( info->tfe->has_regf_id ?
|
||||||
|
info->tfe->regf_id : info->tfe->id, 1);
|
||||||
if (!info->reg_d) {
|
if (!info->reg_d) {
|
||||||
if (info->driver->type != TTY_TYPE__EXT_TTY) {
|
if (info->driver->type != TTY_TYPE__EXT_TTY) {
|
||||||
if (!deprecated_ok("TTY w/o regfile"))
|
if (!deprecated_ok("TTY w/o regfile"))
|
||||||
@ -1904,14 +1905,23 @@ static int dump_one_tty(int lfd, u32 id, const struct fd_parms *p)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (driver->type != TTY_TYPE__EXT_TTY && dump_one_reg_file(lfd, id, p))
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
e.id = id;
|
e.id = id;
|
||||||
e.tty_info_id = tty_gen_id(driver, index);
|
e.tty_info_id = tty_gen_id(driver, index);
|
||||||
e.flags = p->flags;
|
e.flags = p->flags;
|
||||||
e.fown = (FownEntry *)&p->fown;
|
e.fown = (FownEntry *)&p->fown;
|
||||||
|
|
||||||
|
if (driver->type != TTY_TYPE__EXT_TTY) {
|
||||||
|
u32 rf_id;
|
||||||
|
|
||||||
|
fd_id_generate_special(NULL, &rf_id);
|
||||||
|
if (dump_one_reg_file(lfd, rf_id, p))
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
e.has_regf_id = true;
|
||||||
|
e.regf_id = rf_id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FIXME
|
* FIXME
|
||||||
*
|
*
|
||||||
|
@ -81,4 +81,5 @@ message tty_file_entry {
|
|||||||
|
|
||||||
required uint32 flags = 3 [(criu).hex = true];
|
required uint32 flags = 3 [(criu).hex = true];
|
||||||
required fown_entry fown = 4;
|
required fown_entry fown = 4;
|
||||||
|
optional uint32 regf_id = 6;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user