summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-06-10 21:44:19 -0400
committerDan McGee <dan@archlinux.org>2012-07-10 08:33:33 -0500
commitea3439f928a72bd942a810651565cb01e99b5293 (patch)
treebc4c62bd034ef2d7c22b783938d58aa9a2a38bf8
parent0c62b36c19d67939d7a84159c86a5de73fd9d36f (diff)
diskspace: log errors when opening the mount table fails
Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--lib/libalpm/diskspace.c6
1 files changed, 6 insertions, 0 deletions
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;
}