In order to be able to modify a config we need to look it up
first. The nvme_lookup_subsystem() call will crash if we don't
provide a NQN.
The transport is needed to be able lookup a controller.
Signed-off-by: Daniel Wagner <dwagner@suse.de>
nvme_subsystem_t s;
nvme_ctrl_t c;
+ if (!subsysnqn) {
+ fprintf(stderr,
+ "required argument [--nqn | -n] needed with --modify\n");
+ return -EINVAL;
+ }
+
+ if (!transport) {
+ fprintf(stderr,
+ "required argument [--transport | -t] needed with --modify\n");
+ return EINVAL;
+ }
+
if (!hostnqn)
hostnqn = hnqn = nvmf_hostnqn_from_file();
if (!hostid && hnqn)