block size is always 512 on rust

This commit is contained in:
bootandy
2018-03-22 14:29:59 -04:00
parent 3796c39ac9
commit 03a517a310
+3 -7
View File
@@ -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
} }