summaryrefslogtreecommitdiff
path: root/src/os/os_rmdir.c
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-02-17 17:25:57 +0000
committer <>2015-03-17 16:26:24 +0000
commit780b92ada9afcf1d58085a83a0b9e6bc982203d1 (patch)
tree598f8b9fa431b228d29897e798de4ac0c1d3d970 /src/os/os_rmdir.c
parent7a2660ba9cc2dc03a69ddfcfd95369395cc87444 (diff)
downloadberkeleydb-master.tar.gz
Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz.HEADdb-6.1.23master
Diffstat (limited to 'src/os/os_rmdir.c')
-rw-r--r--src/os/os_rmdir.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/os/os_rmdir.c b/src/os/os_rmdir.c
new file mode 100644
index 00000000..ab3a1556
--- /dev/null
+++ b/src/os/os_rmdir.c
@@ -0,0 +1,38 @@
+/*-
+ * See the file LICENSE for redistribution information.
+ *
+ * Copyright (c) 1997, 2015 Oracle and/or its affiliates. All rights reserved.
+ *
+ * $Id$
+ */
+
+#include "db_config.h"
+
+#include "db_int.h"
+
+/*
+ * __os_rmdir --
+ * Remove a directory.
+ *
+ * PUBLIC: int __os_rmdir __P((ENV *, const char *));
+ */
+int
+__os_rmdir(env, name)
+ ENV *env;
+ const char *name;
+{
+ DB_ENV *dbenv;
+ int ret;
+
+ dbenv = env == NULL ? NULL : env->dbenv;
+ if (dbenv != NULL &&
+ FLD_ISSET(dbenv->verbose, DB_VERB_FILEOPS | DB_VERB_FILEOPS_ALL))
+ __db_msg(env, DB_STR_A("0239", "fileops: rmdir %s",
+ "%s"), name);
+
+ RETRY_CHK((rmdir(name)), ret);
+ if (ret != 0)
+ return (__os_posix_err(ret));
+
+ return (ret);
+}