Amir Goldstein <amir73il@xxxxxxxxx> writes: >> + printf("unexpected FAN MARK: %llx\n", metadata->mask); >> + continue; >> + } else if (metadata->fd != FAN_NOFD) { >> + printf("Unexpected fd (!= FAN_NOFD)\n"); >> + continue; >> + } >> + >> + printf("FAN_ERROR found len=%d\n", metadata->event_len); >> + >> + error = (struct fanotify_event_info_error *) (metadata+1); >> + if (error->hdr.info_type == FAN_EVENT_INFO_TYPE_ERROR) { > > You meant != FAN_EVENT_INFO_TYPE_ERROR ? Ugh. the FAN_EVENT_INFO_TYPE_ERROR definition on this file was not updated, preventing me from catching this. nice catch. > >> + printf("unknown record: %d\n", error->hdr.info_type); >> + continue; >> + } >> + >> + printf(" Generic Error Record: len=%d\n", error->hdr.len); >> + printf(" fsid: %llx\n", error->fsid); >> + printf(" error: %d\n", error->error); >> + printf(" inode: %lu\n", error->inode); >> + printf(" error_count: %d\n", error->error_count); >> + } >> +} >> + >> +int main(int argc, char **argv) >> +{ >> + int fd; >> + char buffer[BUFSIZ]; > > BUFSIZ not defined? that's from stdio.h. -- Gabriel Krisman Bertazi