diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2005-10-29 07:09:48 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2005-10-29 07:09:48 +0000 |
commit | 48c6090098483dca972827eaa870413beb6ce8fc (patch) | |
tree | a280abe4b974a617999f4d078581c8e014a5cfe4 | |
parent | 44fc71396fd43cf832f30d4a3a3da0e0a53853f0 (diff) | |
download | pacman-48c6090098483dca972827eaa870413beb6ce8fc.tar.xz |
added PACCONF, PACDB and PACROOT defines
-rw-r--r-- | src/pacman/pacman.c | 8 | ||||
-rw-r--r-- | src/pacman/pacman.h | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index af1ef932..698cbfe2 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -121,7 +121,7 @@ int main(int argc, char *argv[]) } if(config->root == NULL) { - config->root = strdup("/"); + config->root = strdup(PACROOT); } /* add a trailing '/' if there isn't one */ @@ -143,14 +143,14 @@ int main(int argc, char *argv[]) if(config->configfile == NULL) { config->configfile = strdup(PACCONF); } - if(parseconfig(config) == -1) { + if(parseconfig(config->configfile, config) == -1) { cleanup(1); } if(config->dbpath == NULL) { - config->dbpath = strdup("var/lib/pacman"); + config->dbpath = strdup(PACDB); } if(config->cachedir == NULL) { - config->cachedir = strdup("var/cache/pacman"); + config->cachedir = strdup(PACCACHE); } /* set library parameters */ diff --git a/src/pacman/pacman.h b/src/pacman/pacman.h index 77d5240b..3a8775f6 100644 --- a/src/pacman/pacman.h +++ b/src/pacman/pacman.h @@ -21,9 +21,10 @@ #ifndef _PM_PACMAN_H #define _PM_PACMAN_H -#ifndef PACCONF +#define PACROOT "/" +#define PACDB "var/lib/pacman" +#define PACCACHE "var/cache/pacman" #define PACCONF "/etc/pacman.conf" -#endif /* Operations */ #define PM_OP_MAIN 1 |