summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-07-03 23:53:24 -0400
committerDan McGee <dan@archlinux.org>2012-07-10 08:39:20 -0500
commit392fffe24126c1d0404ead75c1743411fe65310a (patch)
tree5bb2e15789fc69770d5115f5b6d62c805197224b /src
parente0daaea38cf7b06bdf9534d793f7fb64cc59cbf6 (diff)
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 <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'src')
-rw-r--r--src/pacman/conf.c3
1 files changed, 2 insertions, 1 deletions
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;
}