mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
restore: Move type from file_desc to file_desc_ops
This saves some space on dynamic file_desc and makes file_desc_ops looks closer to fdinfo_ops used on dump. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
@@ -679,6 +679,7 @@ static int open_unix_sk(struct file_desc *d)
|
||||
}
|
||||
|
||||
static struct file_desc_ops unix_desc_ops = {
|
||||
.type = FDINFO_UNIXSK,
|
||||
.open = open_unix_sk,
|
||||
.want_transport = unixsk_should_open_transport,
|
||||
};
|
||||
@@ -740,8 +741,7 @@ int collect_unix_sockets(void)
|
||||
ui->peer = NULL;
|
||||
ui->flags = 0;
|
||||
pr_info(" `- Got 0x%x peer 0x%x\n", ui->ue.id, ui->ue.peer);
|
||||
file_desc_add(&ui->d, FDINFO_UNIXSK, ui->ue.id,
|
||||
&unix_desc_ops);
|
||||
file_desc_add(&ui->d, ui->ue.id, &unix_desc_ops);
|
||||
list_add_tail(&ui->list, &unix_sockets);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user