mirror of
https://github.com/bootandy/dust.git
synced 2026-06-08 11:29:05 +03:00
block size is always 512 on rust
This commit is contained in:
@@ -1,12 +1,8 @@
|
|||||||
use std;
|
use std;
|
||||||
|
|
||||||
#[cfg(not(any(target_os = "macos", target_os = "linux")))]
|
fn get_block_size() -> u64 {
|
||||||
pub fn get_block_size() -> u64 {
|
// All os specific implementations of MetatdataExt seem to define a block as 512 bytes
|
||||||
1024
|
// https://doc.rust-lang.org/std/os/linux/fs/trait.MetadataExt.html#tymethod.st_blocks
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
|
||||||
pub fn get_block_size() -> u64 {
|
|
||||||
512
|
512
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user