summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2008-10-10 14:43:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2008-10-10 14:43:39 +0300
commit83c4098e4f8affdb7f52aa5ed14ac15d7785f5b9 (patch)
tree10453f0667459020c6478499308b4ea1e2eaa9c0
parentaa509e3c5e68ed905a80743bd3e8f3e26aa67590 (diff)
downloadrpm-83c4098e4f8affdb7f52aa5ed14ac15d7785f5b9.tar.gz
rpm-83c4098e4f8affdb7f52aa5ed14ac15d7785f5b9.tar.bz2
rpm-83c4098e4f8affdb7f52aa5ed14ac15d7785f5b9.zip
And out goes rpmMkdirPath()
-rw-r--r--lib/misc.c21
-rw-r--r--lib/misc.h10
2 files changed, 0 insertions, 31 deletions
diff --git a/lib/misc.c b/lib/misc.c
index 26546ab01..692a64999 100644
--- a/lib/misc.c
+++ b/lib/misc.c
@@ -13,27 +13,6 @@ const char * const RPMVERSION = VERSION;
#include "debug.h"
-rpmRC rpmMkdirPath (const char * dpath, const char * dname)
-{
- struct stat st;
- int rc;
-
- if ((rc = stat(dpath, &st)) < 0) {
- if (errno == ENOENT) {
- rc = mkdir(dpath, 0755);
- }
- if (rc < 0) {
- rpmlog(RPMLOG_ERR, _("cannot create %%%s %s\n"), dname, dpath);
- return RPMRC_FAIL;
- }
- }
- if ((rc = access(dpath, W_OK))) {
- rpmlog(RPMLOG_ERR, _("cannot write to %%%s %s\n"), dname, dpath);
- return RPMRC_FAIL;
- }
- return RPMRC_OK;
-}
-
/* unameToUid(), uidTouname() and the group variants are really poorly
implemented. They really ought to use hash tables. I just made the
guess that most files would be owned by root or the same person/group
diff --git a/lib/misc.h b/lib/misc.h
index 95eded885..405455dd3 100644
--- a/lib/misc.h
+++ b/lib/misc.h
@@ -13,16 +13,6 @@
extern "C" {
#endif
-/**
- * Create directory if it does not exist, and make sure path is writable.
- * @note This will only create last component of directory path.
- * @param dpath directory path
- * @param dname directory use string
- * @return rpmRC return code
- */
-/* XXX This should be RPM_GNUC_INTERNAL too but toplevel build.c uses ATM */
-rpmRC rpmMkdirPath (const char * dpath, const char * dname);
-
/*
* These may be called w/ a NULL argument to flush the cache -- they return
* -1 if the user can't be found.