summaryrefslogtreecommitdiffstats
path: root/src/pacman/conf.c
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2007-08-22 03:28:05 +0200
committerDan McGee <dan@archlinux.org>2007-08-22 03:28:05 +0200
commitc22e381a8b86412b6c181446128affe32ab1d71e (patch)
tree198d527a3d49819f57fabd8355673328969cc893 /src/pacman/conf.c
parent13525255dcd257e69d7c246bf32ceb263fbc31b9 (diff)
downloadpacman-c22e381a8b86412b6c181446128affe32ab1d71e.tar.gz
pacman-c22e381a8b86412b6c181446128affe32ab1d71e.tar.xz
Post trial install changes, round one
A bunch of changes related to my first "real" install of pacman-git into /usr/local and trying to use it. * Shift some uses of free -> FREE in libalpm. * Move stat and sanity checks of config paths into libalpm from the config and argument parsing in pacman.c. * Fix issue where dbpath still was not defined early enough due to its requirement for being used in alpm_db_register. This should be rewritten so it doesn't have this dependency, but this will work for now. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src/pacman/conf.c')
-rw-r--r--src/pacman/conf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/pacman/conf.c b/src/pacman/conf.c
index 245e3c04..a4fd1318 100644
--- a/src/pacman/conf.c
+++ b/src/pacman/conf.c
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <stdio.h>
+#include <string.h> /* strdup */
/* pacman */
#include "conf.h"
@@ -34,8 +35,11 @@ config_t *config_new(void)
fprintf(stderr, "malloc failure: could not allocate %d bytes\n",
sizeof(config_t));
}
+ /* defaults which may get overridden later */
config->op = PM_OP_MAIN;
config->logmask = PM_LOG_ERROR | PM_LOG_WARNING;
+ /* CONFFILE is defined at compile-time */
+ config->configfile = strdup(CONFFILE);
return(config);
}