mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 14:25:49 +00:00
collect: Reduce amount of args to collect_image call
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
16
sk-netlink.c
16
sk-netlink.c
@@ -234,13 +234,15 @@ static int collect_one_netlink_sk(void *o, ProtobufCMessage *base)
|
||||
return file_desc_add(&si->d, si->nse->id, &netlink_sock_desc_ops);
|
||||
}
|
||||
|
||||
struct collect_image_info netlink_sk_cinfo = {
|
||||
.fd_type = CR_FD_NETLINKSK,
|
||||
.pb_type = PB_NETLINKSK,
|
||||
.priv_size = sizeof(struct netlink_sock_info),
|
||||
.collect = collect_one_netlink_sk,
|
||||
.flags = COLLECT_OPTIONAL,
|
||||
};
|
||||
|
||||
int collect_netlink_sockets(void)
|
||||
{
|
||||
int ret = collect_image(CR_FD_NETLINKSK, PB_NETLINKSK,
|
||||
sizeof(struct netlink_sock_info), collect_one_netlink_sk);
|
||||
|
||||
if (ret < 0 && errno == ENOENT)
|
||||
return 0;
|
||||
|
||||
return ret;
|
||||
return collect_image(&netlink_sk_cinfo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user