Blame SOURCES/autofs-5.1.4-tiny-patch-for-autofs-typo-and-possible-bug.patch

d5dcad
autofs-5.1.4 - tiny patch for autofs typo and possible bug
d5dcad
d5dcad
From: Todd Eigenschink <todd@fai2.com>
d5dcad
d5dcad
(1) The word "to" is doubled in two warnings.
d5dcad
d5dcad
(2) It prints a warning when it can't open the "old" config file, even
d5dcad
if it was able to open the default one. That's a reasonable warning if
d5dcad
it *couldn't* open the new one, but seems unnecessary if it could.
d5dcad
d5dcad
The patch removes the unneeded "to"s and only prints warning about the
d5dcad
old config file if it couldn't open the default one.
d5dcad
d5dcad
Signed-off-by: Todd Eigenschink <todd@fai2.com>
d5dcad
Signed-off-by: Ian Kent <raven@themaw.net>
d5dcad
---
d5dcad
 CHANGELOG      |    1 +
d5dcad
 lib/defaults.c |    6 +++---
d5dcad
 2 files changed, 4 insertions(+), 3 deletions(-)
d5dcad
d5dcad
--- autofs-5.1.4.orig/CHANGELOG
d5dcad
+++ autofs-5.1.4/CHANGELOG
d5dcad
@@ -20,6 +20,7 @@ xx/xx/2018 autofs-5.1.5
d5dcad
 - add conditional inclusion of fedfs binaries.
d5dcad
 - add an example fedfs master map entry to the installed master map.
d5dcad
 - improve hostname lookup error logging.
d5dcad
+- tiny patch for autofs typo and possible bug.
d5dcad
 
d5dcad
 19/12/2017 autofs-5.1.4
d5dcad
 - fix spec file url.
d5dcad
--- autofs-5.1.4.orig/lib/defaults.c
d5dcad
+++ autofs-5.1.4/lib/defaults.c
d5dcad
@@ -1207,12 +1207,12 @@ unsigned int defaults_read_config(unsign
d5dcad
 
d5dcad
 	conf = open_fopen_r(DEFAULT_CONFIG_FILE);
d5dcad
 	if (!conf)
d5dcad
-		message(to_syslog, "failed to to open config %s",
d5dcad
+		message(to_syslog, "failed to open config %s",
d5dcad
 			DEFAULT_CONFIG_FILE);
d5dcad
 
d5dcad
 	oldconf = open_fopen_r(OLD_CONFIG_FILE);
d5dcad
-	if (!oldconf)
d5dcad
-		message(to_syslog, "failed to to open old config %s",
d5dcad
+	if (!oldconf && !conf)
d5dcad
+		message(to_syslog, "failed to open old config %s",
d5dcad
 			OLD_CONFIG_FILE);
d5dcad
 
d5dcad
 	/* Neither config has been updated */