]> www.infradead.org Git - users/sagi/nvme-cli.git/commitdiff
fabrics: Honor config file for connect-all
authorDaniel Wagner <dwagner@suse.de>
Thu, 19 May 2022 12:14:47 +0000 (14:14 +0200)
committerDaniel Wagner <dwagner@suse.de>
Thu, 19 May 2022 12:20:01 +0000 (14:20 +0200)
The command line option -J config.json allows to provide a
configuration via a JSON file. We handle this correctly for the
'connect' case but fail to apply the configuration for 'connect-all'
because we missed to add nvme_read_config() in this path.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
fabrics.c

index b89de252f58dc513a6c7c68392054b92ae91e7d3..9f26879101fb3b0a549670d51f4fb47e0a09dd6e 100644 (file)
--- a/fabrics.c
+++ b/fabrics.c
@@ -666,6 +666,7 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect)
                nvme_free_tree(r);
                return ret;
        }
+       nvme_read_config(r, config_file);
 
        if (!hostnqn)
                hostnqn = hnqn = nvmf_hostnqn_from_file();