From 1d35c4dcc6399023217e41eaa8ff4733b1ad2b0d Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Thu, 29 Mar 2007 22:44:10 -0500 Subject: Report an error on setmntent failure Signed-off-by: Aaron Griffin --- lib/libalpm/util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c index daaa8c76..decb5959 100644 --- a/lib/libalpm/util.c +++ b/lib/libalpm/util.c @@ -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); } -- cgit v1.2.3-70-g09d2