Report an error on setmntent failure
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
parent
970d2e942e
commit
1d35c4dcc6
1 changed files with 3 additions and 1 deletions
|
@ -560,11 +560,13 @@ cleanup:
|
|||
static long long get_freespace()
|
||||
{
|
||||
struct mntent *mnt;
|
||||
char *table = MOUNTED;
|
||||
const char *table = MOUNTED;
|
||||
FILE *fp;
|
||||
long long ret=0;
|
||||
|
||||
if((fp = setmntent(table, "r")) == NULL) {
|
||||
_alpm_log(PM_LOG_ERROR, _("cannot read disk space information from %s: %s"),
|
||||
table, strerror(errno));
|
||||
return(-1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue