From: Martin George Date: Mon, 11 Apr 2022 12:03:17 +0000 (+0530) Subject: fabrics: error message for nvme discover/connect-all with no params X-Git-Tag: v2.1-rc0~71^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=75fbd6966c88e6b2110c3f7c530fd3f7e2edde37;p=users%2Fsagi%2Fnvme-cli.git fabrics: error message for nvme discover/connect-all with no params Currently when nvme discover or connect-all is called without passing any params, it simply blanks out without any meaningful error. So add an appropriate error message for such scenarios, similar to what's done in the erstwhile nvme-cli-monolithic branch. Signed-off-by: Martin George --- diff --git a/fabrics.c b/fabrics.c index 92c5312f..fad63de2 100644 --- a/fabrics.c +++ b/fabrics.c @@ -526,6 +526,7 @@ static int discover_from_conf_file(nvme_root_t r, nvme_host_t h, f = fopen(PATH_NVMF_DISC, "r"); if (f == NULL) { + fprintf(stderr, "No params given and no %s\n", PATH_NVMF_DISC); errno = ENOENT; return -1; }