1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-25 01:08:51 -05:00
Author: Aaron Griffin <aaronmgriffin@gmail.com>
Date:   Thu Mar 29 22:44:10 2007 -0500

    Report an error on setmntent failure

    Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
This commit is contained in:
Aaron Griffin 2007-03-30 04:46:17 +00:00
parent a0f8f03056
commit 19cec12f73

View File

@ -560,11 +560,13 @@ cleanup:
static long long get_freespace() static long long get_freespace()
{ {
struct mntent *mnt; struct mntent *mnt;
char *table = MOUNTED; const char *table = MOUNTED;
FILE *fp; FILE *fp;
long long ret=0; long long ret=0;
if((fp = setmntent(table, "r")) == NULL) { if((fp = setmntent(table, "r")) == NULL) {
_alpm_log(PM_LOG_ERROR, _("cannot read disk space information from %s: %s"),
table, strerror(errno));
return(-1); return(-1);
} }