linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nfs-utils] conffile: Don't give warning for optional config files.
@ 2020-03-27  5:10 NeilBrown
  2020-03-27 19:16 ` Steve Dickson
  0 siblings, 1 reply; 2+ messages in thread
From: NeilBrown @ 2020-03-27  5:10 UTC (permalink / raw)
  To: Steve Dickson; +Cc: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 1154 bytes --]


A recent commit added the possibility of optional config files for which
warning messages would be suppressed.
Unfortunately only one of the possible warning messages - the least
likely one - was suppressed.

This patch suppresses the other.

Fixes: c6fdcbe0a5cf ("conffile: allow optional include files")
Signed-off-by: NeilBrown <neilb@suse.de>
---
 support/nfs/conffile.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)


That was careless - sorry.  I really have tested this time.
NeilBrown

diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index d55bfe10120a..3d13610ee766 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
@@ -429,9 +429,9 @@ conf_parse_line(int trans, char *line, const char *filename, int lineno, char **
 
 		subconf = conf_readfile(relpath);
 		if (subconf == NULL) {
-			xlog_warn("config error at %s:%d: "
-				"error loading included config",
-				  filename, lineno);
+			if (!optional)
+				xlog_warn("config error at %s:%d: error loading included config",
+					  filename, lineno);
 			if (relpath)
 				free(relpath);
 			return;
-- 
2.25.2


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-27 19:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27  5:10 [PATCH nfs-utils] conffile: Don't give warning for optional config files NeilBrown
2020-03-27 19:16 ` Steve Dickson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).