From bbfe57b95ad56f5c627e989b3d494da0bc951309 Mon Sep 17 00:00:00 2001 From: Aurelien Foret Date: Sat, 29 Oct 2005 07:18:40 +0000 Subject: fixed parseconfig usage --- src/pacman/conf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pacman/conf.c') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 72031a5f..fe3d8ad7 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -71,7 +71,7 @@ int config_free(config_t *config) return(0); } -int parseconfig(config_t *config) +int parseconfig(char *file, config_t *config) { FILE *fp = NULL; char line[PATH_MAX+1]; @@ -85,7 +85,7 @@ int parseconfig(config_t *config) return(-1); } - fp = fopen(config->configfile, "r"); + fp = fopen(file, "r"); if(fp == NULL) { return(0); } @@ -169,7 +169,7 @@ int parseconfig(config_t *config) char conf[PATH_MAX]; strncpy(conf, ptr, PATH_MAX); vprint("config: including %s\n", conf); - parseconfig(conf); + parseconfig(conf, config); } else if(!strcmp(section, "options")) { if(!strcmp(key, "NOUPGRADE")) { char *p = ptr; -- cgit v1.2.3-70-g09d2