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

show: don't show RAW images in show_all

If an image isn't specified, crtool shows content of all images.
Now crtools aborts in this case due to BUG_ON(1) in show methods
for raw images. I sugget to skip such images.
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 579a5cd2
......@@ -85,6 +85,8 @@ static void show_inventory(int fd, struct cr_options *o)
.show = _show, \
}
static void show_raw_image(int fd, struct cr_options *opt) {};
struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
FD_ENTRY(INVENTORY, "inventory", show_inventory),
FD_ENTRY(FDINFO, "fdinfo-%d", show_files),
......@@ -123,8 +125,8 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
FD_ENTRY(TCP_STREAM, "tcp-stream-%x", show_tcp_stream),
FD_ENTRY(MOUNTPOINTS, "mountpoints-%d", show_mountpoints),
FD_ENTRY(NETDEV, "netdev-%d", show_netdevices),
FD_ENTRY(IFADDR, "ifaddr-%d", show_ifaddrs),
FD_ENTRY(ROUTE, "route-%d", show_routes),
FD_ENTRY(IFADDR, "ifaddr-%d", show_raw_image),
FD_ENTRY(ROUTE, "route-%d", show_raw_image),
};
static struct cr_fdset *alloc_cr_fdset(int nr)
......
......@@ -2,8 +2,6 @@
#define __CR_NET_H__
struct cr_options;
void show_netdevices(int fd, struct cr_options *);
void show_ifaddrs(int fd, struct cr_options *);
void show_routes(int fd, struct cr_options *);
struct cr_fdset;
int dump_net_ns(int pid, struct cr_fdset *);
......
......@@ -260,16 +260,6 @@ static inline int restore_route(int pid)
return restore_ip_dump(CR_FD_ROUTE, pid, "route");
}
void show_ifaddrs(int fd, struct cr_options *o)
{
BUG_ON(1);
}
void show_routes(int fd, struct cr_options *o)
{
BUG_ON(1);
}
int dump_net_ns(int pid, struct cr_fdset *fds)
{
int ret;
......
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