Commit a365befa authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

tty: Add show method

Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 89a7a45d
......@@ -41,6 +41,7 @@
#include "protobuf/vma.pb-c.h"
#include "protobuf/creds.pb-c.h"
#include "protobuf/core.pb-c.h"
#include "protobuf/tty.pb-c.h"
#define DEF_PAGES_PER_LINE 6
......@@ -113,6 +114,16 @@ void show_fifo(int fd, struct cr_options *o)
pb_show_plain(fd, PB_FIFO);
}
void show_tty(int fd, struct cr_options *o)
{
pb_show_plain(fd, PB_TTY);
}
void show_tty_info(int fd, struct cr_options *o)
{
pb_show_plain(fd, PB_TTY_INFO);
}
void show_fs(int fd_fs, struct cr_options *o)
{
pb_show_vertical(fd_fs, PB_FS);
......
......@@ -128,8 +128,8 @@ struct cr_fd_desc_tmpl fdset_template[CR_FD_MAX] = {
FD_ENTRY(IFADDR, "ifaddr-%d", show_raw_image),
FD_ENTRY(ROUTE, "route-%d", show_raw_image),
FD_ENTRY(TMPFS, "tmpfs-%d.tar.gz", show_raw_image),
FD_ENTRY(TTY, "tty", NULL),
FD_ENTRY(TTY_INFO, "tty-info", NULL),
FD_ENTRY(TTY, "tty", show_tty),
FD_ENTRY(TTY_INFO, "tty-info", show_tty_info),
};
static struct cr_fdset *alloc_cr_fdset(int nr)
......
......@@ -136,6 +136,8 @@ void show_remap_files(int fd, struct cr_options *o);
void show_ghost_file(int fd, struct cr_options *o);
void show_fown_cont(void *p);
void show_eventfds(int fd, struct cr_options *o);
void show_tty(int fd, struct cr_options *o);
void show_tty_info(int fd, struct cr_options *o);
int check_img_inventory(void);
int write_img_inventory(void);
......
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