summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2014-06-06 15:25:08 +1000
committerMartin Schwenke <martins@samba.org>2014-06-12 05:40:10 +0200
commit49e34651a95a336c9e410e4b52a8cfd491ca0a67 (patch)
tree7ce194e44b4838e2d8292988f1a2c145d70c3583
parent4736486188afb8ff6243bcc8a27daa9dbcc64b7a (diff)
downloadsamba-49e34651a95a336c9e410e4b52a8cfd491ca0a67.zip
samba-49e34651a95a336c9e410e4b52a8cfd491ca0a67.tar.gz
samba-49e34651a95a336c9e410e4b52a8cfd491ca0a67.tar.xz
ctdb-common: Move mkdir_p_or_die to system utilities
Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
-rw-r--r--ctdb/common/ctdb_util.c14
-rw-r--r--ctdb/common/system_util.c14
2 files changed, 14 insertions, 14 deletions
diff --git a/ctdb/common/ctdb_util.c b/ctdb/common/ctdb_util.c
index 9f599d6..f71f74a 100644
--- a/ctdb/common/ctdb_util.c
+++ b/ctdb/common/ctdb_util.c
@@ -470,17 +470,3 @@ void ctdb_set_runstate(struct ctdb_context *ctdb, enum ctdb_runstate runstate)
runstate_to_string(runstate), runstate));
ctdb->runstate = runstate;
}
-
-void mkdir_p_or_die(const char *dir, int mode)
-{
- int ret;
-
- ret = mkdir_p(dir, mode);
- if (ret != 0) {
- DEBUG(DEBUG_ALERT,
- ("ctdb exiting with error: "
- "failed to create directory \"%s\" (%s)\n",
- dir, strerror(errno)));
- exit(1);
- }
-}
diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c
index d2d9b31..6a5f454 100644
--- a/ctdb/common/system_util.c
+++ b/ctdb/common/system_util.c
@@ -349,3 +349,17 @@ int mkdir_p(const char *dir, int mode)
return ret;
}
+
+void mkdir_p_or_die(const char *dir, int mode)
+{
+ int ret;
+
+ ret = mkdir_p(dir, mode);
+ if (ret != 0) {
+ DEBUG(DEBUG_ALERT,
+ ("ctdb exiting with error: "
+ "failed to create directory \"%s\" (%s)\n",
+ dir, strerror(errno)));
+ exit(1);
+ }
+}