Skip to content

Commit 75cfffc

Browse files
martin-gpyigaw
authored andcommitted
fabrics: add error if --tls and --concat are invoked together
--tls and --concat are mutually exclusive and not meant to be invoked together. So add an appropriate error message for the same. Signed-off-by: Martin George <[email protected]>
1 parent 0f88488 commit 75cfffc

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

libnvme/src/nvme/fabrics.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,11 @@ static int build_options(nvme_host_t h, nvme_ctrl_t c, char **argstr)
732732

733733
ctrlkey = nvme_ctrl_get_dhchap_key(c);
734734

735+
if (cfg->tls && cfg->concat) {
736+
nvme_msg(h->ctx, LOG_ERR, "cannot specify --tls and --concat together\n");
737+
return -ENVME_CONNECT_INVAL;
738+
}
739+
735740
if (cfg->tls) {
736741
ret = __nvme_import_keys_from_config(h, c, &keyring_id, &key_id);
737742
if (ret)

0 commit comments

Comments
 (0)