From 12507e51a426d168c48defc67d3ba223371a73b2 Mon Sep 17 00:00:00 2001 From: Paul Millar Date: Fri, 20 Apr 2018 10:28:21 +0200 Subject: [PATCH] inotify_add_watch.2: Add IN_ONLYDIR based error I noticed that it was undocumented how inotify_add_watch(2) behaves if IN_ONLYDIR is specified and the target is not a directory. I've included a patch that adds ENOTDIR as an additional error in the inotify_add_watch(2) man page. Signed-off-by: Michael Kerrisk --- man2/inotify_add_watch.2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/man2/inotify_add_watch.2 b/man2/inotify_add_watch.2 index 5bb7c94a7..e9ba038eb 100644 --- a/man2/inotify_add_watch.2 +++ b/man2/inotify_add_watch.2 @@ -113,6 +113,14 @@ Insufficient kernel memory was available. .B ENOSPC The user limit on the total number of inotify watches was reached or the kernel failed to allocate a needed resource. +.TP +.B ENOTDIR +.I mask +contains +.B IN_ONLYDIR +and +.I pathname +is not a directory. .SH VERSIONS Inotify was merged into the 2.6.13 Linux kernel. .SH CONFORMING TO