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>
(cherry picked from commit 8c55c0096c
)
This commit is contained in:
parent
80a0016de4
commit
c2aed8aaff
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue