bb3ce0cf21
Support optional include files correctly (boo#1164619) OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=218
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
From 1c20fcd0a315f3c692a465159985e6125289f4e4 Mon Sep 17 00:00:00 2001
|
|
From: NeilBrown <neilb@suse.de>
|
|
Date: Fri, 27 Mar 2020 15:58:24 +1100
|
|
Subject: [PATCH] conffile: Don't give warning for optional config files.
|
|
|
|
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(-)
|
|
|
|
--- a/support/nfs/conffile.c
|
|
+++ b/support/nfs/conffile.c
|
|
@@ -429,9 +429,9 @@ conf_parse_line(int trans, char *line, c
|
|
|
|
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;
|