2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-03 07:45:17 +00:00

collect: Reduce amount of args to collect_image call

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-08-21 03:27:06 +04:00
parent 9917c4fe34
commit 64e7d2435a
15 changed files with 203 additions and 103 deletions

View File

@@ -826,14 +826,21 @@ static int collect_one_unixsk(void *o, ProtobufCMessage *base)
return file_desc_add(&ui->d, ui->ue->id, &unix_desc_ops);
}
struct collect_image_info unix_sk_cinfo = {
.fd_type = CR_FD_UNIXSK,
.pb_type = PB_UNIXSK,
.priv_size = sizeof(struct unix_sk_info),
.collect = collect_one_unixsk,
.flags = COLLECT_SHARED,
};
int collect_unix_sockets(void)
{
int ret;
pr_info("Reading unix sockets in\n");
ret = collect_image_sh(CR_FD_UNIXSK, PB_UNIXSK,
sizeof(struct unix_sk_info), collect_one_unixsk);
ret = collect_image(&unix_sk_cinfo);
if (!ret)
ret = read_sk_queues();