diff --git a/src/uu/stat/src/stat.rs b/src/uu/stat/src/stat.rs index 7d2ad04b0..c26bca394 100644 --- a/src/uu/stat/src/stat.rs +++ b/src/uu/stat/src/stat.rs @@ -8,7 +8,7 @@ #[macro_use] extern crate uucore; use uucore::display::Quotable; -use uucore::error::{UResult, USimpleError}; +use uucore::error::{FromIo, UResult, USimpleError}; use uucore::fs::display_permissions; use uucore::fsext::{ pretty_filetype, pretty_fstype, pretty_time, read_fs_list, statfs, BirthTime, FsMeta, @@ -501,7 +501,8 @@ impl Stater { // mount points aren't displayed when showing filesystem information None } else { - let mut mount_list = read_fs_list()? + let mut mount_list = read_fs_list() + .map_err_context(|| "cannot read table of mounted file systems".into())? .iter() .map(|mi| mi.mount_dir.clone()) .collect::>();