Skip to contentSkip to conversation

nfsidmapd: allow the usage message to be displayed

PATCH In review Steve Dickson 1 participant 2 messages Feb 13, 2016 – Mar 16, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nfsidmapd: allow the usage message to be displayed

xlog_err() never returns. Change the xlog_err(),
when invalid arguments are use, to xlog_warn()
so the second xlog_warn, displaying the usage,
will be called.

---
 utils/nfsidmap/nfsidmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/nfsidmap/nfsidmap.c +1 -1
index d980c68..2abefe9 100644
@@ -430,7 +430,7 @@ int main(int argc, char **argv)
 
 	xlog_stderr(verbose);
 	if ((argc - optind) != 2) {
-		xlog_err("Bad arg count. Check /etc/request-key.conf");
+		xlog_warn("Bad arg count. Check /etc/request-key.conf");
 		xlog_warn(usage, progname);
 		return EXIT_FAILURE;
 	}
Signature · 1 line
2.5.0
#1 lore raw
Quoted 6 lines · Steve Dickson

xlog_err() never returns. Change the xlog_err(),
when invalid arguments are use, to xlog_warn()
so the second xlog_warn, displaying the usage,
will be called.

Committed...

steved.

Quoted 18 lines
---
 utils/nfsidmap/nfsidmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/nfsidmap/nfsidmap.c +1 -1
index d980c68..2abefe9 100644
@@ -430,7 +430,7 @@ int main(int argc, char **argv)
 
 	xlog_stderr(verbose);
 	if ((argc - optind) != 2) {
-		xlog_err("Bad arg count. Check /etc/request-key.conf");
+		xlog_warn("Bad arg count. Check /etc/request-key.conf");
 		xlog_warn(usage, progname);
 		return EXIT_FAILURE;
 	}