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

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

From: Hannes Reinecke <hare@suse.de>
Date: 2021-02-04 07:13:16

On 1/26/21 9:33 PM, mwilck@suse.com wrote:
quoted hunk ↗ jump to hunk
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"),
This patch is slightly confusing.

It just adds an option, but there is not code evaluating this option. So 
where does it hook in?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                Kernel Storage Architect
hare@suse.de                              +49 911 74053 688
SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg
HRB 36809 (AG Nürnberg), Geschäftsführer: Felix Imendörffer

_______________________________________________
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