autofs/SOURCES/autofs-5.1.4-tiny-patch-for-autofs-typo-and-possible-bug.patch
2021-10-08 09:50:49 +00:00

49 lines
1.6 KiB
Diff

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