1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00

Renamed PACXXX defines to PM_XXX

This commit is contained in:
Aurelien Foret 2005-03-16 19:18:09 +00:00
parent ba13bc8b7b
commit 5faecdb523
3 changed files with 9 additions and 9 deletions

View File

@ -68,13 +68,13 @@ int alpm_initialize(char *root)
/* lock db */ /* lock db */
if(handle->access == PM_ACCESS_RW) { if(handle->access == PM_ACCESS_RW) {
if(_alpm_lckmk(PACLOCK) == -1) { if(_alpm_lckmk(PM_LOCK) == -1) {
FREE(handle); FREE(handle);
PM_RET_ERR(PM_ERR_HANDLE_LOCK, -1); 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 */ /* add a trailing '/' if there isn't one */
if(str[strlen(str)-1] != '/') { if(str[strlen(str)-1] != '/') {
strcat(str, "/"); strcat(str, "/");
@ -92,9 +92,9 @@ int alpm_release()
/* unlock db */ /* unlock db */
if(handle->access == PM_ACCESS_RW) { if(handle->access == PM_ACCESS_RW) {
if(_alpm_lckrm(PACLOCK)) { if(_alpm_lckrm(PM_LOCK)) {
_alpm_log(PM_LOG_WARNING, "could not remove lock file %s", PACLOCK); _alpm_log(PM_LOG_WARNING, "could not remove lock file %s", PM_LOCK);
alpm_logaction("warning: could not remove lock file %s", PACLOCK); alpm_logaction("warning: could not remove lock file %s", PM_LOCK);
} }
} }

View File

@ -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); 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); handle->dbpath = strdup(str);
_alpm_log(PM_LOG_FLOW2, "PM_OPT_DBPATH set to '%s'", handle->dbpath); _alpm_log(PM_LOG_FLOW2, "PM_OPT_DBPATH set to '%s'", handle->dbpath);
break; break;

View File

@ -26,9 +26,9 @@
#include "trans.h" #include "trans.h"
#include "alpm.h" #include "alpm.h"
#define PACROOT "/" #define PM_ROOT "/"
#define PACDBPATH "var/lib/pacman" #define PM_DBPATH "var/lib/pacman"
#define PACLOCK "/tmp/pacman.lck" #define PM_LOCK "/tmp/pacman.lck"
typedef enum __pmaccess_t { typedef enum __pmaccess_t {
PM_ACCESS_RO, PM_ACCESS_RO,