1
0
mirror of https://github.com/moparisthebest/pacman synced 2025-01-08 12:28:00 -05:00

Report an error on setmntent failure

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2007-03-29 22:44:10 -05:00
parent 970d2e942e
commit 1d35c4dcc6

View File

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