Commit 7e9fe49f authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

files: Move fle_init() to files.c

It has only one user. Also, in next patches will be
used pstree_item_by_virt() function, and I don't
want to add "#include" to "files.h" for it, and to
nest headers.
Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent f6c9ac7e
...@@ -692,6 +692,14 @@ int rst_file_params(int fd, FownEntry *fown, int flags) ...@@ -692,6 +692,14 @@ int rst_file_params(int fd, FownEntry *fown, int flags)
return 0; return 0;
} }
static void fle_init(struct fdinfo_list_entry *fle, int pid, FdinfoEntry *fe)
{
fle->pid = pid;
fle->fe = fe;
fle->received = 0;
fle->stage = FLE_INITIALIZED;
}
static int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info) static int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info)
{ {
struct fdinfo_list_entry *le, *new_le; struct fdinfo_list_entry *le, *new_le;
......
...@@ -89,14 +89,6 @@ struct fdinfo_list_entry { ...@@ -89,14 +89,6 @@ struct fdinfo_list_entry {
u8 stage:3; u8 stage:3;
}; };
static inline void fle_init(struct fdinfo_list_entry *fle, int pid, FdinfoEntry *fe)
{
fle->pid = pid;
fle->fe = fe;
fle->received = 0;
fle->stage = FLE_INITIALIZED;
}
/* reports whether fd_a takes prio over fd_b */ /* reports whether fd_a takes prio over fd_b */
static inline int fdinfo_rst_prio(struct fdinfo_list_entry *fd_a, struct fdinfo_list_entry *fd_b) static inline int fdinfo_rst_prio(struct fdinfo_list_entry *fd_a, struct fdinfo_list_entry *fd_b)
{ {
......
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