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:
parent
0c62b36c19
commit
ea3439f928
1 changed files with 6 additions and 0 deletions
|
@ -102,6 +102,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
|
||||||
fp = setmntent(MOUNTED, "r");
|
fp = setmntent(MOUNTED, "r");
|
||||||
|
|
||||||
if(fp == NULL) {
|
if(fp == NULL) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR, _("could not open file: %s: %s\n"),
|
||||||
|
MOUNTED, strerror(errno));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,6 +125,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
|
||||||
fp = fopen("/etc/mnttab", "r");
|
fp = fopen("/etc/mnttab", "r");
|
||||||
|
|
||||||
if(fp == NULL) {
|
if(fp == NULL) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR, _("could not open file %s: %s\n"),
|
||||||
|
"/etc/mnttab", strerror(errno));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,6 +152,8 @@ static alpm_list_t *mount_point_list(alpm_handle_t *handle)
|
||||||
entries = getmntinfo(&fsp, MNT_NOWAIT);
|
entries = getmntinfo(&fsp, MNT_NOWAIT);
|
||||||
|
|
||||||
if(entries < 0) {
|
if(entries < 0) {
|
||||||
|
_alpm_log(handle, ALPM_LOG_ERROR,
|
||||||
|
_("could not get filesystem information\n"));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue