0d27429e94
See https://build.voidlinux.org/builders/armv7l-musl_builder/builds/20286/steps/shell_3/logs/stdio
24 lines
1.2 KiB
Diff
24 lines
1.2 KiB
Diff
diff --git a/src/blocks/disk_space.rs b/src/blocks/disk_space.rs
|
|
--- src/blocks/disk_space.rs
|
|
+++ src/blocks/disk_space.rs
|
|
@@ -189,16 +189,16 @@ impl Block for DiskSpace {
|
|
let mut result;
|
|
let mut converted = 0.0f64;
|
|
let mut converted_str = String::new();
|
|
- let total = statvfs.blocks() * statvfs.fragment_size();
|
|
- let used = (statvfs.blocks() - statvfs.blocks_free()) * statvfs.fragment_size();
|
|
+ let total = (statvfs.blocks() * statvfs.fragment_size() as u64) as u64;
|
|
+ let used = ((statvfs.blocks() - statvfs.blocks_free()) * statvfs.fragment_size() as u64) as u64;
|
|
|
|
match self.info_type {
|
|
InfoType::Available => {
|
|
- result = statvfs.blocks_available() * statvfs.block_size();
|
|
+ result = (statvfs.blocks_available() * statvfs.block_size() as u64) as u64;
|
|
converted = Unit::bytes_in_unit(self.unit, result);
|
|
}
|
|
InfoType::Free => {
|
|
- result = statvfs.blocks_free() * statvfs.block_size();
|
|
+ result = (statvfs.blocks_free() * statvfs.block_size() as u64) as u64;
|
|
converted = Unit::bytes_in_unit(self.unit, result);
|
|
}
|
|
InfoType::Total => {
|