[CRIU] [PATCH 04/18] fsnotify: inotify -- Add dumping of optional fields
Pavel Emelyanov
xemul at parallels.com
Mon Jan 14 04:13:40 EST 2013
On 01/11/2013 08:58 PM, Cyrill Gorcunov wrote:
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
> ---
> fsnotify.c | 2 ++
> proc_parse.c | 2 ++
> 2 files changed, 4 insertions(+)
>
> diff --git a/fsnotify.c b/fsnotify.c
> index 4f8bc80..1f1d434 100644
> --- a/fsnotify.c
> +++ b/fsnotify.c
> @@ -92,6 +92,8 @@ static int dump_one_fsnotify(int lfd, u32 id, const struct fd_parms *p)
> ie.id = id;
> ie.flags = p->flags;
> ie.fown = (FownEntry *)&p->fown;
> + ie.has_type = true;
> + ie.type = FSNOTIFY_TYPE__INOTIFY;
>
> pr_info("id 0x%08x flags 0x%08x\n", ie.id, ie.flags);
> if (pb_write_one(fdset_fd(glob_fdset, CR_FD_FSNOTIFY), &ie, PB_FSNOTIFY))
> diff --git a/proc_parse.c b/proc_parse.c
> index cdba19b..bd14975 100644
> --- a/proc_parse.c
> +++ b/proc_parse.c
> @@ -928,6 +928,8 @@ int parse_fdinfo(int fd, int type,
>
> fsnotify_wd_entry__init(&entry.fsy);
> entry.fsy.f_handle = &f_handle;
> + entry.fsy.has_type = true;
> + entry.fsy.type = FSNOTIFY_TYPE__INOTIFY;
>
> if (type != FD_TYPES__FSNOTIFY)
> goto parse_err;
Why is the same field initialized two times? Here and in dump_one_fsnotify?
More information about the CRIU
mailing list