Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm
diff options
context:
space:
mode:
authorMartin Kühne <mysatyre@gmail.com>2016-10-11 18:36:17 +0200
committerAllan McRae <allan@archlinux.org>2016-10-12 19:48:29 +1000
commit8c55c0096c355e973ce6111cb25a1c4fa05953cf (patch)
tree7a1d0d885d1b1c8c0646e0beeb52438ab9428ee9 /lib/libalpm
parentad27aa30fbcac7a07586072d29d3db50009994e9 (diff)
Use f_bavail for diskspace calculations
This should make pacman's behavior consistent with GNU coreutils df, as well as follow advice from affected filesystems' devs as well as `man statvfs`. This fixes FS#37402 Signed-off-by: Martin Kühne <mysatyre@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm')
-rw-r--r--lib/libalpm/diskspace.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libalpm/diskspace.c b/lib/libalpm/diskspace.c
index da4ad560..55343c16 100644
--- a/lib/libalpm/diskspace.c
+++ b/lib/libalpm/diskspace.c
@@ -348,11 +348,11 @@ static int check_mountpoint(alpm_handle_t *handle, alpm_mountpoint_t *mp)
_alpm_log(handle, ALPM_LOG_DEBUG,
"partition %s, needed %jd, cushion %ju, free %ju\n",
mp->mount_dir, (intmax_t)mp->max_blocks_needed,
- (uintmax_t)cushion, (uintmax_t)mp->fsp.f_bfree);
- if(needed >= 0 && (fsblkcnt_t)needed > mp->fsp.f_bfree) {
+ (uintmax_t)cushion, (uintmax_t)mp->fsp.f_bavail);
+ if(needed >= 0 && (fsblkcnt_t)needed > mp->fsp.f_bavail) {
_alpm_log(handle, ALPM_LOG_ERROR,
_("Partition %s too full: %jd blocks needed, %ju blocks free\n"),
- mp->mount_dir, (intmax_t)needed, (uintmax_t)mp->fsp.f_bfree);
+ mp->mount_dir, (intmax_t)needed, (uintmax_t)mp->fsp.f_bavail);
return 1;
}
return 0;