aboutsummaryrefslogtreecommitdiffstats
path: root/man7
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2019-06-08 12:32:17 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2019-06-08 13:56:00 +0200
commit2d26ddfa556f431ffe9e1ee541f723d5678bbddd (patch)
tree7c7420f88f8e4eab8a3c58d9c8ab3e58ea05f756 /man7
parent6f10bd3260a54d76cd9aac8ec6ac9921b49e8dd1 (diff)
downloadman-pages-2d26ddfa556f431ffe9e1ee541f723d5678bbddd.tar.gz
fanotify.7: Clarify logic in ESTALE check
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Diffstat (limited to 'man7')
-rw-r--r--man7/fanotify.716
1 files changed, 9 insertions, 7 deletions
diff --git a/man7/fanotify.7 b/man7/fanotify.7
index 5b9d5ff95d..a4c522bd28 100644
--- a/man7/fanotify.7
+++ b/man7/fanotify.7
@@ -1065,13 +1065,15 @@ main(int argc, char **argv)
deleted for the object prior to this system call. */
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");
- continue;
- } else if (ret == \-1) {
- perror("open_by_handle_at");
- exit(EXIT_FAILURE);
+ if (ret == \-1) {
+ if (errno == ESTALE) {
+ printf("File handle is no longer valid. "
+ "File has been deleted\e\n");
+ continue;
+ } else {
+ perror("open_by_handle_at");
+ exit(EXIT_FAILURE);
+ }
}
snprintf(procfd_path, sizeof(procfd_path), "/proc/self/fd/%d",