Commit d4c6e785 authored by Pavel Emelyanov's avatar Pavel Emelyanov

tty: Generate unique ID for satellite regfile entry

Same thing as for fifo-s.
Reviewed-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent c0e929ab
......@@ -1626,7 +1626,8 @@ static int tty_info_setup(struct tty_info *info)
* reg file rectord because they are inherited from
* 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->driver->type != TTY_TYPE__EXT_TTY) {
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;
}
if (driver->type != TTY_TYPE__EXT_TTY && dump_one_reg_file(lfd, id, p))
return -1;
e.id = id;
e.tty_info_id = tty_gen_id(driver, index);
e.flags = p->flags;
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
*
......
......@@ -81,4 +81,5 @@ message tty_file_entry {
required uint32 flags = 3 [(criu).hex = true];
required fown_entry fown = 4;
optional uint32 regf_id = 6;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment