Commit dcf158e2 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

crtools: fix backward compatibility

crtools should not failed, if new images are absent.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 46c6b791
......@@ -129,6 +129,11 @@ static int collect_one_sigfd(void *o, ProtobufCMessage *msg)
int collect_signalfd(void)
{
return collect_image(CR_FD_SIGNALFD, PB_SIGNALFD,
int ret = collect_image(CR_FD_SIGNALFD, PB_SIGNALFD,
sizeof(struct signalfd_info), collect_one_sigfd);
if (ret < 0 && errno == ENOENT)
return 0;
return ret;
}
......@@ -497,6 +497,11 @@ static int collect_one_packet_sk(void *o, ProtobufCMessage *base)
int collect_packet_sockets(void)
{
return collect_image(CR_FD_PACKETSK, PB_PACKETSK,
int ret = collect_image(CR_FD_PACKETSK, PB_PACKETSK,
sizeof(struct packet_sock_info), collect_one_packet_sk);
if (ret < 0 && errno == ENOENT)
return 0;
return ret;
}
......@@ -972,6 +972,8 @@ int collect_tty(void)
ret = collect_image(CR_FD_TTY_INFO, PB_TTY_INFO,
sizeof(struct tty_info_entry),
collect_one_tty_info_entry);
if (ret && errno == ENOENT)
return 0;
if (!ret)
ret = collect_image(CR_FD_TTY, PB_TTY,
sizeof(struct tty_info),
......
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