]> www.infradead.org Git - users/hch/nvme-cli.git/commit
nvme-cli: have cfg var get set more than 1 execution
authorJay Freyensee <james_p_freyensee@linux.intel.com>
Fri, 7 Oct 2016 18:46:16 +0000 (11:46 -0700)
committerJay Freyensee <james_p_freyensee@linux.intel.com>
Fri, 7 Oct 2016 19:14:53 +0000 (12:14 -0700)
commit2da2440f1e5e98df61b192446be7c68a170dcda6
treec70c2685660d69e3eb0ec2c8342b214c7a0ea52e
parent9278b6eb4bad36829ef635eeadf48b700cb0ec06
nvme-cli: have cfg var get set more than 1 execution

Without this fix, the struct config cfg variable only
gets set one time when argconfig_parse() is called. Any other
time it is attempted to be set, it acts as a read-only value
and continues to use the initial value it was set with.

This poses a problem for the discovery feature, discovery.conf file
as it is desired to make the file multiple line instead of a single
line, such as:

-t rdma -a 192.168.69.33 -s 4420 -q host2-proper-nqn
-t rdma -a 192.168.1.4   -s 4420 -q host2-proper-nqn
-t rdma -a 192.168.69.33 -s 99 -q host2-proper-nqn

I've tried the fix with a few existing commands and nothing
appears to be broken, but I haven't done an exhaustive test.

Reported-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
Originally-by: Sagi Grimberg <sagi@lightbits.io>
Tested-by: Jay Freyensee <james_p_freyensee@linux.intel.com>
argconfig.c