From 392fffe24126c1d0404ead75c1743411fe65310a Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Tue, 3 Jul 2012 23:53:24 -0400 Subject: pacman: be more descriptive when opening an include fails if fopen returns NULL, append the libc strerror-ized error message to our own error message. Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- src/pacman/conf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pacman/conf.c b/src/pacman/conf.c index 4aaacb54..f47b92dc 100644 --- a/src/pacman/conf.c +++ b/src/pacman/conf.c @@ -720,7 +720,8 @@ static int _parseconfig(const char *file, struct section_t *section, pm_printf(ALPM_LOG_DEBUG, "config: attempting to read file %s\n", file); fp = fopen(file, "r"); if(fp == NULL) { - pm_printf(ALPM_LOG_ERROR, _("config file %s could not be read.\n"), file); + pm_printf(ALPM_LOG_ERROR, _("config file %s could not be read: %s\n"), + file, strerror(errno)); ret = 1; goto cleanup; } -- cgit v1.2.3