Commit 78259da3 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

fsnotify: Add is_fanotify_link helper

Will need it to dump fanotify objects.
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent f58ab92c
...@@ -62,6 +62,12 @@ int is_inotify_link(int lfd) ...@@ -62,6 +62,12 @@ int is_inotify_link(int lfd)
return is_anon_link_type(lfd, "inotify"); return is_anon_link_type(lfd, "inotify");
} }
/* Checks if file desciptor @lfd is fanotify */
int is_fanotify_link(int lfd)
{
return is_anon_link_type(lfd, "[fanotify]");
}
void show_inotify_wd(int fd_inotify_wd, struct cr_options *o) void show_inotify_wd(int fd_inotify_wd, struct cr_options *o)
{ {
pb_show_plain(fd_inotify_wd, PB_INOTIFY_WD); pb_show_plain(fd_inotify_wd, PB_INOTIFY_WD);
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "crtools.h" #include "crtools.h"
extern int is_inotify_link(int lfd); extern int is_inotify_link(int lfd);
extern int is_fanotify_link(int lfd);
extern int dump_inotify(struct fd_parms *p, int lfd, const int fdinfo); extern int dump_inotify(struct fd_parms *p, int lfd, const int fdinfo);
extern int collect_inotify(void); extern int collect_inotify(void);
extern void show_inotify_wd(int fd_inotify_wd, struct cr_options *o); extern void show_inotify_wd(int fd_inotify_wd, struct cr_options *o);
......
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