Patchwork [BUG:1408] xlators/mgmt: exit if directory creation fails.

login
register
Submitter Sachidananda
Date 2010-08-20 06:58:32
Message ID <20100820065832.GA13276@dev.gluster.com>
Download mbox | patch
Permalink /patch/4220/
State Accepted
Headers show

Comments

Sachidananda - 2010-08-20 06:58:32
Signed-off-by: Sachidananda Urs <sac@gluster.com>
---
 xlators/mgmt/glusterd/src/glusterd.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Patch

diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 33c9ac7..15cc9cd 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -234,6 +234,7 @@  init (xlator_t *this)
                         gf_log (this->name, GF_LOG_CRITICAL,
                                 "Unable to create directory %s"
                                 " ,errno = %d", dirname, errno);
+                        exit (1);
                 }
         }
 
@@ -248,6 +249,7 @@  init (xlator_t *this)
                 gf_log (this->name, GF_LOG_CRITICAL,
                         "Unable to create volume directory %s"
                         " ,errno = %d", voldir, errno);
+                exit (1);
         }
 
         snprintf (voldir, PATH_MAX, "%s/peers", dirname);
@@ -258,6 +260,7 @@  init (xlator_t *this)
                 gf_log (this->name, GF_LOG_CRITICAL,
                         "Unable to create peers directory %s"
                         " ,errno = %d", voldir, errno);
+                exit (1);
         }
 
         rpc = rpcsvc_init (this->ctx, this->options);