Skip to content

Commit 0bfc29e

Browse files
committed
mount: Be compatible with older util-linux
This is the same as coreos/bootupd@1457c20 and makes things work on c9s. Signed-off-by: Colin Walters <[email protected]>
1 parent 8bf5de7 commit 0bfc29e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

lib/src/mount.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use crate::task::Task;
1010
#[derive(Deserialize, Debug)]
1111
#[serde(rename_all = "kebab-case")]
1212
pub(crate) struct Filesystem {
13+
// Note if you add an entry to this list, you need to change the --output invocation below too
1314
pub(crate) source: String,
1415
pub(crate) fstype: String,
1516
pub(crate) options: String,
@@ -25,7 +26,13 @@ pub(crate) struct Findmnt {
2526
pub(crate) fn inspect_filesystem(path: &Utf8Path) -> Result<Filesystem> {
2627
let desc = format!("Inspecting {path}");
2728
let o = Task::new(&desc, "findmnt")
28-
.args(["-J", "-v", "--output-all", path.as_str()])
29+
.args([
30+
"-J",
31+
"-v",
32+
// If you change this you probably also want to change the Filesystem struct above
33+
"--output=SOURCE,FSTYPE,OPTIONS,UUID",
34+
path.as_str(),
35+
])
2936
.quiet()
3037
.read()?;
3138
let o: Findmnt = serde_json::from_str(&o).context("Parsing findmnt output")?;

0 commit comments

Comments
 (0)