aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorSteve Dickson <steved@redhat.com>2020-03-08 15:20:04 -0400
committerSteve Dickson <steved@redhat.com>2020-03-27 13:09:06 -0400
commit4269e5ee8f4764db419bf0368e5a370251dea145 (patch)
treea46ec7bf6b146fdde6c639e2355d2ce840c01f05 /utils
parent54176d0fd54659d8d0225bb5ef777f5a08337e9b (diff)
downloadnfs-utils-4269e5ee8f4764db419bf0368e5a370251dea145.tar.gz
gssd: ignore pipe files that do not exist
As part commit e0eb6ebb which cleaned up the dnotify to inotify conversion (commit 55197c98) ignore pipe files that don't exist Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/gssd/gssd.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/utils/gssd/gssd.c b/utils/gssd/gssd.c
index c38dedb2..588da0fb 100644
--- a/utils/gssd/gssd.c
+++ b/utils/gssd/gssd.c
@@ -493,8 +493,8 @@ gssd_get_clnt(struct topdir *tdi, const char *name)
clp->wd = inotify_add_watch(inotify_fd, clp->relpath, IN_CREATE | IN_DELETE);
if (clp->wd < 0) {
if (errno != ENOENT)
- printerr(0, "ERROR: inotify_add_watch failed for %s: %s\n",
- clp->relpath, strerror(errno));
+ printerr(0, "ERROR: %s: inotify_add_watch failed for %s: %s\n",
+ __FUNCTION__, clp->relpath, strerror(errno));
goto out;
}
@@ -523,8 +523,9 @@ gssd_scan_clnt(struct clnt_info *clp)
clntfd = openat(pipefs_fd, clp->relpath, O_RDONLY);
if (clntfd < 0) {
- printerr(0, "ERROR: can't openat %s: %s\n",
- clp->relpath, strerror(errno));
+ if (errno != ENOENT)
+ printerr(0, "ERROR: %s: can't openat %s: %s\n",
+ __FUNCTION__, clp->relpath, strerror(errno));
return -1;
}
@@ -588,8 +589,8 @@ gssd_get_topdir(const char *name)
tdi->wd = inotify_add_watch(inotify_fd, name, IN_CREATE);
if (tdi->wd < 0) {
- printerr(0, "ERROR: inotify_add_watch failed for top dir %s: %s\n",
- tdi->name, strerror(errno));
+ printerr(0, "ERROR: %s: inotify_add_watch failed for top dir %s: %s\n",
+ __FUNCTION__, tdi->name, strerror(errno));
free(tdi);
return NULL;
}
@@ -616,8 +617,9 @@ gssd_scan_topdir(const char *name)
dfd = openat(pipefs_fd, tdi->name, O_RDONLY);
if (dfd < 0) {
- printerr(0, "ERROR: can't openat %s: %s\n",
- tdi->name, strerror(errno));
+ if (errno != ENOENT)
+ printerr(0, "ERROR: %s: can't openat %s: %s\n",
+ __FUNCTION__, tdi->name, strerror(errno));
return;
}