39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
From 85a44e5bff53fa28fc1346a3c1a789f9a3050345 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Date: Tue, 26 Oct 2021 17:25:54 +0200
|
|
Subject: [PATCH 3/5] Print the path to the makefs command in --help
|
|
|
|
It is called at runtime, but not in any output files, so if this
|
|
is misconfigured, it can be quite hard to notice. So let's add this
|
|
to make life easier when something is misconfigured.
|
|
---
|
|
src/main.rs | 1 +
|
|
src/setup.rs | 2 +-
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/main.rs b/src/main.rs
|
|
index a17e0f9235..5bfa556cd0 100644
|
|
--- a/src/main.rs
|
|
+++ b/src/main.rs
|
|
@@ -41,6 +41,7 @@ fn get_opts() -> Opts {
|
|
.number_of_values(2)
|
|
.conflicts_with_all(&["setup-device", "reset-device"]),
|
|
)
|
|
+ .after_help(&*("Uses ".to_owned() + setup::SYSTEMD_MAKEFS_COMMAND + " to perform setup."))
|
|
.get_matches();
|
|
|
|
let val = opts
|
|
diff --git a/src/setup.rs b/src/setup.rs
|
|
index befb0032f5..74572e55e0 100644
|
|
--- a/src/setup.rs
|
|
+++ b/src/setup.rs
|
|
@@ -9,7 +9,7 @@ use std::os::unix::process::ExitStatusExt;
|
|
use std::path::Path;
|
|
use std::process::Command;
|
|
|
|
-const SYSTEMD_MAKEFS_COMMAND: &str = concat!(
|
|
+pub const SYSTEMD_MAKEFS_COMMAND: &str = concat!(
|
|
env!(
|
|
"SYSTEMD_UTIL_DIR",
|
|
"Define $SYSTEMD_UTIL_DIR to the result of \
|