1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

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>
This commit is contained in:
Dave Reisner 2012-06-10 21:44:19 -04:00 committed by Dan McGee
parent 0c62b36c19
commit ea3439f928

View File

@ -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;
}