From ea3439f928a72bd942a810651565cb01e99b5293 Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sun, 10 Jun 2012 21:44:19 -0400 Subject: diskspace: log errors when opening the mount table fails Signed-off-by: Dave Reisner Signed-off-by: Dan McGee --- lib/libalpm/diskspace.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/libalpm') diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c index 8fc4d9b0..2582c4c3 100644 --- a/lib/libalpm/diskspace.c +++ b/lib/libalpm/diskspace.c @@ -102,6 +102,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle) fp = setmntent(MOUNTED, "r"); if(fp == NULL) { + _alpm_log(handle, ALPM_LOG_ERROR, _("could not open file: %s: %s\n"), + MOUNTED, strerror(errno)); return NULL; } @@ -123,6 +125,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle) fp = fopen("/etc/mnttab", "r"); if(fp == NULL) { + _alpm_log(handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"), + "/etc/mnttab", strerror(errno)); return NULL; } @@ -148,6 +152,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle) entries = getmntinfo(&fsp, MNT_NOWAIT); if(entries < 0) { + _alpm_log(handle, ALPM_LOG_ERROR, + _("could not get filesystem information\n")); return NULL; } -- cgit v1.2.3-24-g4f1b