#define BUF_SIZE 256
-int main(int argc, char **argv)
+int
+main(int argc, char **argv)
{
int fd, ret, event_fd;
ssize_t len, path_len;
char path[PATH_MAX];
char procfd_path[PATH_MAX];
char events_buf[BUF_SIZE];
-
struct file_handle *file_handle;
struct fanotify_event_metadata *metadata;
struct fanotify_event_info_fid *fid;
event_fd = open_by_handle_at(AT_FDCWD, file_handle, O_RDONLY);
if (ret == \-1 && errno == ESTALE) {
- printf("File handle is no longer valid. File has been deleted\e\n");
+ printf("File handle is no longer valid. "
+ "File has been deleted\e\n");
continue;
} else if (ret == \-1) {
perror("open_by_handle_at");
exit(EXIT_FAILURE);
}
- snprintf(procfd_path, sizeof(procfd_path), "/proc/self/fd/%d", event_fd);
+ snprintf(procfd_path, sizeof(procfd_path), "/proc/self/fd/%d",
+ event_fd);
/* Retrieve and print the path of the modified dentry */