Commit 8c70b99d authored by Pavel Emelyanov's avatar Pavel Emelyanov

files: Move fifo into files image

Reviewed-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent fd39196d
...@@ -256,7 +256,6 @@ static int crtools_prepare_shared(void) ...@@ -256,7 +256,6 @@ static int crtools_prepare_shared(void)
static struct collect_image_info *cinfos[] = { static struct collect_image_info *cinfos[] = {
&pipe_cinfo, &pipe_cinfo,
&fifo_cinfo,
&file_locks_cinfo, &file_locks_cinfo,
&pipe_data_cinfo, &pipe_data_cinfo,
&fifo_data_cinfo, &fifo_data_cinfo,
...@@ -265,6 +264,7 @@ static struct collect_image_info *cinfos[] = { ...@@ -265,6 +264,7 @@ static struct collect_image_info *cinfos[] = {
static struct collect_image_info *cinfos_files[] = { static struct collect_image_info *cinfos_files[] = {
&unix_sk_cinfo, &unix_sk_cinfo,
&fifo_cinfo,
&nsfile_cinfo, &nsfile_cinfo,
&packet_sk_cinfo, &packet_sk_cinfo,
&netlink_sk_cinfo, &netlink_sk_cinfo,
......
...@@ -41,7 +41,8 @@ static struct pipe_data_dump pd_fifo = { .img_type = CR_FD_FIFO_DATA, }; ...@@ -41,7 +41,8 @@ static struct pipe_data_dump pd_fifo = { .img_type = CR_FD_FIFO_DATA, };
static int dump_one_fifo(int lfd, u32 id, const struct fd_parms *p) static int dump_one_fifo(int lfd, u32 id, const struct fd_parms *p)
{ {
struct cr_img *img = img_from_set(glob_imgset, CR_FD_FIFO); struct cr_img *img = img_from_set(glob_imgset, CR_FD_FILES);
FileEntry fe = FILE_ENTRY__INIT;
FifoEntry e = FIFO_ENTRY__INIT; FifoEntry e = FIFO_ENTRY__INIT;
/* /*
...@@ -58,7 +59,11 @@ static int dump_one_fifo(int lfd, u32 id, const struct fd_parms *p) ...@@ -58,7 +59,11 @@ static int dump_one_fifo(int lfd, u32 id, const struct fd_parms *p)
e.id = id; e.id = id;
e.pipe_id = pipe_id(p); e.pipe_id = pipe_id(p);
if (pb_write_one(img, &e, PB_FIFO)) fe.type = FD_TYPES__FIFO;
fe.id = e.id;
fe.fifo = &e;
if (pb_write_one(img, &fe, PB_FILE))
return -1; return -1;
return dump_one_pipe_data(&pd_fifo, lfd, p); return dump_one_pipe_data(&pd_fifo, lfd, p);
......
...@@ -1728,6 +1728,9 @@ static int collect_one_file(void *o, ProtobufCMessage *base, struct cr_img *i) ...@@ -1728,6 +1728,9 @@ static int collect_one_file(void *o, ProtobufCMessage *base, struct cr_img *i)
case FD_TYPES__UNIXSK: case FD_TYPES__UNIXSK:
ret = collect_one_file_entry(fe, fe->usk->id, &fe->usk->base, &unix_sk_cinfo); ret = collect_one_file_entry(fe, fe->usk->id, &fe->usk->base, &unix_sk_cinfo);
break; break;
case FD_TYPES__FIFO:
ret = collect_one_file_entry(fe, fe->fifo->id, &fe->fifo->base, &fifo_cinfo);
break;
} }
return ret; return ret;
......
...@@ -58,7 +58,6 @@ enum { ...@@ -58,7 +58,6 @@ enum {
CR_FD_SK_QUEUES, CR_FD_SK_QUEUES,
CR_FD_PIPES, CR_FD_PIPES,
CR_FD_PIPES_DATA, CR_FD_PIPES_DATA,
CR_FD_FIFO,
CR_FD_FIFO_DATA, CR_FD_FIFO_DATA,
CR_FD_TTY_FILES, CR_FD_TTY_FILES,
CR_FD_TTY_INFO, CR_FD_TTY_INFO,
...@@ -106,6 +105,7 @@ enum { ...@@ -106,6 +105,7 @@ enum {
CR_FD_FANOTIFY_FILE, CR_FD_FANOTIFY_FILE,
CR_FD_EXT_FILES, CR_FD_EXT_FILES,
CR_FD_UNIXSK, CR_FD_UNIXSK,
CR_FD_FIFO,
CR_FD_AUTOFS, CR_FD_AUTOFS,
......
...@@ -13,6 +13,7 @@ import "timerfd.proto"; ...@@ -13,6 +13,7 @@ import "timerfd.proto";
import "fsnotify.proto"; import "fsnotify.proto";
import "ext-file.proto"; import "ext-file.proto";
import "sk-unix.proto"; import "sk-unix.proto";
import "fifo.proto";
enum fd_types { enum fd_types {
UND = 0; UND = 0;
...@@ -59,4 +60,5 @@ message file_entry { ...@@ -59,4 +60,5 @@ message file_entry {
optional fanotify_file_entry ffy = 14; optional fanotify_file_entry ffy = 14;
optional ext_file_entry ext = 15; optional ext_file_entry ext = 15;
optional unix_sk_entry usk = 16; optional unix_sk_entry usk = 16;
optional fifo_entry fifo = 17;
} }
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