File 0007-fabrics-error-message-for-nvme-discover-connect-all-.patch of Package nvme-cli.27116

From: Martin George <marting@netapp.com>
Date: Mon, 11 Apr 2022 17:33:17 +0530
Subject: fabrics: error message for nvme discover/connect-all with no params
Git-commit: 75fbd6966c88e6b2110c3f7c530fd3f7e2edde37
References: git-fixes

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 <marting@netapp.com>
Acked-by: Daniel Wagner <dwagner@suse.de>
---
 fabrics.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fabrics.c
+++ b/fabrics.c
@@ -529,6 +529,7 @@ static int discover_from_conf_file(nvme_
 
 	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;
 	}
openSUSE Build Service is sponsored by