Thread (15 messages) read the whole thread 15 messages, 4 authors, 2016-08-09
STALE3643d

[PATCH v2 nvme-cli 3/4] fabrics: Allow discover params to come from a conf file

From: hch@lst.de (Christoph Hellwig)
Date: 2016-08-08 13:35:02

On Mon, Aug 08, 2016@02:57:59PM +0300, Sagi Grimberg wrote:
Allow the user to just run "nvme discover" or "nvme connect-all"
in case it finds a default /etc/nvme/nvmf_disc conf file.
Hmm, can just call this /etc/nvme/discovery.conf or something else
that rolls easier off the hand?
+static int discover_from_conf_file(const char *desc, char *argstr,
+	const struct argconfig_commandline_options *opts, bool connect)
Second tab for the argument indent please.
+		err = build_options(argstr, BUF_SIZE);
+		if (err) {
+			ret = err;
+			continue;
+		}
+
+		err = do_discover(argstr, connect);
+		if (err) {
+			ret = err;
+			continue;
+		}
How will diagnostics look like here if the file has incorrect
syntax?
+	if (!cfg.transport && !cfg.traddr) {
+		return discover_from_conf_file(desc, argstr,
+				command_line_options, connect);
Maybe we want a separate options that says the option needs to be
read from a config file, e.g. --file with an optional argument
for the file name?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help