Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libalpm/alpm.c10
-rw-r--r--lib/libalpm/handle.c2
-rw-r--r--lib/libalpm/handle.h6
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c
index 23528ae4..6b79d4c8 100644
--- a/lib/libalpm/alpm.c
+++ b/lib/libalpm/alpm.c
@@ -68,13 +68,13 @@ int alpm_initialize(char *root)
/* lock db */
if(handle->access == PM_ACCESS_RW) {
- if(_alpm_lckmk(PACLOCK) == -1) {
+ if(_alpm_lckmk(PM_LOCK) == -1) {
FREE(handle);
PM_RET_ERR(PM_ERR_HANDLE_LOCK, -1);
}
}
- strncpy(str, (root) ? root : PACROOT, PATH_MAX);
+ strncpy(str, (root) ? root : PM_ROOT, PATH_MAX);
/* add a trailing '/' if there isn't one */
if(str[strlen(str)-1] != '/') {
strcat(str, "/");
@@ -92,9 +92,9 @@ int alpm_release()
/* unlock db */
if(handle->access == PM_ACCESS_RW) {
- if(_alpm_lckrm(PACLOCK)) {
- _alpm_log(PM_LOG_WARNING, "could not remove lock file %s", PACLOCK);
- alpm_logaction("warning: could not remove lock file %s", PACLOCK);
+ if(_alpm_lckrm(PM_LOCK)) {
+ _alpm_log(PM_LOG_WARNING, "could not remove lock file %s", PM_LOCK);
+ alpm_logaction("warning: could not remove lock file %s", PM_LOCK);
}
}
diff --git a/lib/libalpm/handle.c b/lib/libalpm/handle.c
index 281eb96c..7d83c1e7 100644
--- a/lib/libalpm/handle.c
+++ b/lib/libalpm/handle.c
@@ -130,7 +130,7 @@ int handle_set_option(pmhandle_t *handle, unsigned char val, unsigned long data)
PM_RET_ERR(PM_ERR_TRANS_INITIALIZED, -1);
}
- strncpy(str, ((char *)data) ? (char *)data : PACDBPATH, PATH_MAX);
+ strncpy(str, ((char *)data) ? (char *)data : PM_DBPATH, PATH_MAX);
handle->dbpath = strdup(str);
_alpm_log(PM_LOG_FLOW2, "PM_OPT_DBPATH set to '%s'", handle->dbpath);
break;
diff --git a/lib/libalpm/handle.h b/lib/libalpm/handle.h
index e8f3dbbb..4fe3c3ce 100644
--- a/lib/libalpm/handle.h
+++ b/lib/libalpm/handle.h
@@ -26,9 +26,9 @@
#include "trans.h"
#include "alpm.h"
-#define PACROOT "/"
-#define PACDBPATH "var/lib/pacman"
-#define PACLOCK "/tmp/pacman.lck"
+#define PM_ROOT "/"
+#define PM_DBPATH "var/lib/pacman"
+#define PM_LOCK "/tmp/pacman.lck"
typedef enum __pmaccess_t {
PM_ACCESS_RO,