nvmf: fix Mode Virtual comparison

The strcasecmp() comparison was incorrect, causing "Mode Virtual" to
take the opposite of the intended path.

Change-Id: Ic83f451dee2c7a786a1a9b88cf426fcd5abf3037
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/373392
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Daniel Verkamp 2017-08-08 14:08:45 -07:00
parent 42ec0c007e
commit 45a8da55b6
2 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ spdk_nvmf_parse_subsystem(struct spdk_conf_section *sp)
if (mode) {
SPDK_NOTICELOG("Mode present in the [Subsystem] section of the config file.\n"
"Mode was removed as a valid parameter.\n");
if (strcasecmp(mode, "Virtual")) {
if (strcasecmp(mode, "Virtual") == 0) {
SPDK_NOTICELOG("Your mode value is 'Virtual' which is now the only possible mode.\n"
"Your configuration file will work as expected.\n");
} else {

View File

@ -309,7 +309,7 @@ spdk_rpc_construct_nvmf_subsystem(struct spdk_jsonrpc_request *request,
if (req.mode) {
SPDK_NOTICELOG("Mode present in the construct NVMe-oF subsystem RPC.\n"
"Mode was removed as a valid parameter.\n");
if (strcasecmp(req.mode, "Virtual")) {
if (strcasecmp(req.mode, "Virtual") == 0) {
SPDK_NOTICELOG("Your mode value is 'Virtual' which is now the only possible mode.\n"
"Your RPC will work as expected.\n");
} else {