summaryrefslogtreecommitdiffstats
path: root/contrib/umountd
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/umountd')
-rw-r--r--contrib/umountd/Makefile.am3
-rw-r--r--contrib/umountd/umountd.c18
2 files changed, 12 insertions, 9 deletions
diff --git a/contrib/umountd/Makefile.am b/contrib/umountd/Makefile.am
index c03b0cbcae6..b39e000f5aa 100644
--- a/contrib/umountd/Makefile.am
+++ b/contrib/umountd/Makefile.am
@@ -4,7 +4,8 @@ umountd_CFLAGS = $(GF_CFLAGS) -DDATADIR=\"$(localstatedir)\"
umountd_LDADD = $(top_builddir)/libglusterfs/src/libglusterfs.la ${GF_LDADD}
umountd_LDFLAGS = $(GF_LDFLAGS)
-AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src
+AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
+ -I$(top_srcdir)/rpc/xdr/src -I$(top_builddir)/rpc/xdr/src
AM_CFLAGS = -Wall $(GF_CFLAGS)
CLEANFILES =
diff --git a/contrib/umountd/umountd.c b/contrib/umountd/umountd.c
index 0d2c6f20b60..3f933ecb554 100644
--- a/contrib/umountd/umountd.c
+++ b/contrib/umountd/umountd.c
@@ -23,11 +23,11 @@
#include <sys/stat.h>
#include <sys/mount.h>
-#include "glusterfs.h"
-#include "globals.h"
-#include "logging.h"
-#include "syscall.h"
-#include "mem-types.h"
+#include "glusterfs/glusterfs.h"
+#include "glusterfs/globals.h"
+#include "glusterfs/logging.h"
+#include "glusterfs/syscall.h"
+#include "glusterfs/mem-types.h"
static void
usage (void)
@@ -56,7 +56,8 @@ sanity_check (char *path, dev_t *devp)
break;
default:
gf_log ("umountd", GF_LOG_ERROR,
- "Cannot access %s\n", path, strerror (errno));
+ "Cannot access %s: %s\n",
+ path, strerror (errno));
goto out;
}
}
@@ -65,12 +66,13 @@ sanity_check (char *path, dev_t *devp)
if (*devp == -1 && ret == 0)
*devp = st.st_dev;
- strncpy (pathtmp, path, PATH_MAX);
+ snprintf (pathtmp, PATH_MAX, "%s", path);
parent = dirname (pathtmp);
if (stat (parent, &parent_st) != 0) {
gf_log ("umountd", GF_LOG_ERROR,
- "Cannot access %s\n", parent, strerror (errno));
+ "Cannot access %s: %s\n",
+ parent, strerror (errno));
goto out;
}