Thread (89 messages) 89 messages, 4 authors, 2021-02-22
STALE1957d

[PATCH 11/35] monitor: add option -A / --autoconnect

From: <hidden>
Date: 2021-01-26 20:35:03
Subsystem: the rest · Maintainer: Linus Torvalds

From: Martin Wilck <redacted>

With this option, the monitor will try to connect to newly discovered
controllers.

Signed-off-by: Martin Wilck <redacted>
---
 monitor.c | 5 +++++
 1 file changed, 5 insertions(+)
diff --git a/monitor.c b/monitor.c
index a7afa1c..ecf3be2 100644
--- a/monitor.c
+++ b/monitor.c
@@ -31,6 +31,10 @@
 #define LOG_FUNCNAME 1
 #include "log.h"
 
+static struct monitor_config {
+	bool autoconnect;
+} mon_cfg;
+
 static struct udev *udev;
 
 static void close_ptr(int *p)
@@ -177,6 +181,7 @@ static int monitor_parse_opts(const char *desc, int argc, char **argv)
 	bool debug = false;
 	int ret;
 	OPT_ARGS(opts) = {
+		OPT_FLAG("autoconnect",    'A', &mon_cfg.autoconnect, "automatically connect newly discovered controllers"),
 		OPT_FLAG("silent",         'S', &quiet,               "log level: silent"),
 		OPT_FLAG("verbose",        'v', &verbose,             "log level: verbose"),
 		OPT_FLAG("debug",          'D', &debug,               "log level: debug"),
-- 
2.29.2


_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help