1
0
Fork 0

Adding upstream version 2.7.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-16 12:25:25 +01:00
parent 83f51a6dde
commit e08cb5ae68
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
663 changed files with 15529 additions and 6994 deletions

View file

@ -414,9 +414,11 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h,
nvmf_default_config(&cfg);
ret = flags = validate_output_format(format);
if (ret < 0)
ret = validate_output_format(format, &flags);
if (ret < 0) {
nvme_show_error("Invalid output format");
return ret;
}
f = fopen(PATH_NVMF_DISC, "r");
if (f == NULL) {
@ -697,9 +699,11 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect)
if (ret)
return ret;
ret = flags = validate_output_format(format);
if (ret < 0)
ret = validate_output_format(format, &flags);
if (ret < 0) {
nvme_show_error("Invalid output format");
return ret;
}
if (!strcmp(config_file, "none"))
config_file = NULL;
@ -735,6 +739,8 @@ int nvmf_discover(const char *desc, int argc, char **argv, bool connect)
}
if (!hostid)
hostid = hid = nvmf_hostid_from_file();
if (!hostid && hostnqn)
hostid = hid = nvmf_hostid_from_hostnqn(hostnqn);
nvmf_check_hostid_and_hostnqn(hostid, hostnqn);
h = nvme_lookup_host(r, hostnqn, hostid);
if (!h) {
@ -883,7 +889,7 @@ int nvmf_connect(const char *desc, int argc, char **argv)
int ret;
enum nvme_print_flags flags;
struct nvme_fabrics_config cfg = { 0 };
char *format = "";
char *format = "normal";
NVMF_ARGS(opts, cfg,
@ -900,7 +906,11 @@ int nvmf_connect(const char *desc, int argc, char **argv)
if (ret)
return ret;
flags = validate_output_format(format);
ret = validate_output_format(format, &flags);
if (ret < 0) {
nvme_show_error("Invalid output format");
return ret;
}
if (!subsysnqn) {
fprintf(stderr,
@ -952,6 +962,8 @@ int nvmf_connect(const char *desc, int argc, char **argv)
}
if (!hostid)
hostid = hid = nvmf_hostid_from_file();
if (!hostid && hostnqn)
hostid = hid = nvmf_hostid_from_hostnqn(hostnqn);
nvmf_check_hostid_and_hostnqn(hostid, hostnqn);
h = nvme_lookup_host(r, hostnqn, hostid);
if (!h) {