summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2007-03-29 22:44:10 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2007-03-29 22:44:10 -0500
commit1d35c4dcc6399023217e41eaa8ff4733b1ad2b0d (patch)
tree54db5d5ef2b59fd5c33c5b830b0af1199473ff1d /lib
parent970d2e942eb29bf78fe89895ace4d781970b6e94 (diff)
downloadpacman-1d35c4dcc6399023217e41eaa8ff4733b1ad2b0d.tar.xz
Report an error on setmntent failure
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/libalpm/util.c4
1 files changed, 3 insertions, 1 deletions
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);
}