From 0cea66c8efe0acf6608dd4f150c19413a4be4e2c Mon Sep 17 00:00:00 2001 From: Jesse Malinosky Date: Fri, 7 Jun 2019 00:53:06 -0400 Subject: [PATCH 1/2] fix mounts for freebsd --- src/platform/freebsd.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/platform/freebsd.rs b/src/platform/freebsd.rs index 2a50c68..cfe64f0 100644 --- a/src/platform/freebsd.rs +++ b/src/platform/freebsd.rs @@ -210,8 +210,8 @@ struct statfs { f_fsid: fsid_t, f_charspare: [c_schar; 80], f_fstypename: [c_schar; 16], - f_mntfromname: [c_schar; 88], - f_mntonname: [c_schar; 88], + f_mntfromname: [c_schar; 1024], + f_mntonname: [c_schar; 1024], } impl statfs { From 95b96b085eb109b846b68e6d0be6297c9214afca Mon Sep 17 00:00:00 2001 From: Jesse Malinosky Date: Fri, 7 Jun 2019 00:55:43 -0400 Subject: [PATCH 2/2] fix mount_at test --- src/platform/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/platform/mod.rs b/src/platform/mod.rs index d808597..f7feae3 100644 --- a/src/platform/mod.rs +++ b/src/platform/mod.rs @@ -38,6 +38,7 @@ mod tests { use super::*; use std::thread; use std::time::Duration; + use std::path::PathBuf; #[test] fn test_cpu_load() { @@ -93,7 +94,8 @@ mod tests { #[test] fn test_mount_at() { - let mount = PlatformImpl::new().mount_at("/").unwrap(); + let path = PathBuf::from("/"); + let mount = PlatformImpl::new().mount_at(path).unwrap(); assert!(mount.fs_mounted_on == "/"); }