diff --git a/src/fs/mount.rs b/src/fs/mount.rs index d351476..9ced5f3 100644 --- a/src/fs/mount.rs +++ b/src/fs/mount.rs @@ -876,7 +876,7 @@ impl Display for Mount { write!(f, "mount")?; if !self.options.is_empty() { - write!(f, " -o {}", self.options)?; + write!(f, " {}", self.options)?; } write!(f, " {}", self.source)?; @@ -1260,12 +1260,15 @@ mod tests { #[test] fn mount_display() { - let mnt = Mount::new( + let mut mnt = Mount::new( DeviceId::Label("awawa".into()), "/mnt", MountOptions::default(), ); assert_eq!(mnt.to_string(), "mount LABEL=awawa /mnt"); + + mnt.options.push(MountOption::All); + assert_eq!(mnt.to_string(), "mount --all LABEL=awawa /mnt"); } }