summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/umountd/umountd.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/umountd/umountd.c b/contrib/umountd/umountd.c
index 42f867d1983..0d2c6f20b60 100644
--- a/contrib/umountd/umountd.c
+++ b/contrib/umountd/umountd.c
@@ -49,14 +49,20 @@ sanity_check (char *path, dev_t *devp)
if (path == NULL)
usage ();
- if (stat (path, &st) != 0) {
- gf_log ("umountd", GF_LOG_ERROR,
- "Cannot access %s\n", path, strerror (errno));
- goto out;
+ if ((ret = stat (path, &st)) != 0) {
+ switch (errno) {
+ case ENOTCONN:
+ /* volume is stopped */
+ break;
+ default:
+ gf_log ("umountd", GF_LOG_ERROR,
+ "Cannot access %s\n", path, strerror (errno));
+ goto out;
+ }
}
/* If dev was not specified, get it from path */
- if (*devp == -1)
+ if (*devp == -1 && ret == 0)
*devp = st.st_dev;
strncpy (pathtmp, path, PATH_MAX);