summaryrefslogtreecommitdiffstats
path: root/utils/exportfs/exportfs.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-09-01 11:34:25 -0400
committerSteve Dickson <steved@redhat.com>2011-09-01 11:34:25 -0400
commitf07eb99180aa933366d6ec4ed9422a12d23a17b8 (patch)
tree4cacd5d49760f3fa54411c1a519bc42ef80b9022 /utils/exportfs/exportfs.c
parent32a94f0054478cd2647f98c57dfe43caf8131e15 (diff)
downloadnfs-utils-f07eb99180aa933366d6ec4ed9422a12d23a17b8.tar.gz
nfs-utils-f07eb99180aa933366d6ec4ed9422a12d23a17b8.tar.xz
nfs-utils-f07eb99180aa933366d6ec4ed9422a12d23a17b8.zip
exportfs: do not warn if /etc/exports.d/ does not exist
It isn't uncommon for /etc/exports.d/ to not exist, and imo, it's not that big of a deal as often times, a simple /etc/exports is sufficient. So silently skip the case where the dir is missing. Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'utils/exportfs/exportfs.c')
-rw-r--r--utils/exportfs/exportfs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/utils/exportfs/exportfs.c b/utils/exportfs/exportfs.c
index 986a272..7432a65 100644
--- a/utils/exportfs/exportfs.c
+++ b/utils/exportfs/exportfs.c
@@ -529,9 +529,12 @@ export_d_read(const char *dname)
n = scandir(dname, &namelist, NULL, versionsort);
- if (n < 0)
+ if (n < 0) {
+ if (errno == ENOENT)
+ /* Silently return */
+ return;
xlog(L_NOTICE, "scandir %s: %s", dname, strerror(errno));
- else if (n == 0)
+ } else if (n == 0)
return;
for (i = 0; i < n; i++) {