Compare commits

...

2 commits

Author SHA1 Message Date
b53510c5b7 Merge pull request 'fix compilation on macos' (#654) from trinity-1686a/garage:fix-macos-compilation into main
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #654
2023-10-16 09:33:33 +00:00
c7f5dcd953 fix compilation on macos
All checks were successful
continuous-integration/drone/pr Build is passing
fsblkcnt_t is ony 32b there, so we have to do an additional cast
2023-10-15 17:57:27 +02:00

View file

@ -899,8 +899,8 @@ impl NodeStatus {
use nix::sys::statvfs::statvfs; use nix::sys::statvfs::statvfs;
let mount_avail = |path: &Path| match statvfs(path) { let mount_avail = |path: &Path| match statvfs(path) {
Ok(x) => { Ok(x) => {
let avail = x.blocks_available() * x.fragment_size() as u64; let avail = x.blocks_available() as u64 * x.fragment_size() as u64;
let total = x.blocks() * x.fragment_size() as u64; let total = x.blocks() as u64 * x.fragment_size() as u64;
Some((x.filesystem_id(), avail, total)) Some((x.filesystem_id(), avail, total))
} }
Err(_) => None, Err(_) => None,