diff mbox series

Make logcolors optional in configuration file

Message ID 20200916123318.112079-1-sbabic@denx.de
State Accepted
Headers show
Series Make logcolors optional in configuration file | expand

Commit Message

Stefano Babic Sept. 16, 2020, 12:33 p.m. UTC
Commit 5507fe lets set the colors for logging on the console, but the
setup is mandatory if a configuration file is given. Remove the check if
"logcolors" is found to let the parameter optional.

Signed-off-by: Stefano Babic <sbabic@denx.de>
Reported-by: Christian Storm <christian.storm@siemens.com>
---
 core/swupdate.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox series

Patch

diff --git a/core/swupdate.c b/core/swupdate.c
index ac0515c..07c79f9 100644
--- a/core/swupdate.c
+++ b/core/swupdate.c
@@ -730,12 +730,12 @@  int main(int argc, char **argv)
 		if (swcfg.globals.verbose)
 			loglevel = TRACELEVEL;
 
-		if (read_module_settings(cfgfname, "logcolors",
-			read_console_settings, &swcfg)) {
-			fprintf(stderr,
-				 "Error parsing configuration file, exiting.\n");
-			exit(EXIT_FAILURE);
-		}
+		/*
+		 * logcolors is optional, ignore error code
+		 * if not found
+		 */
+		(void)read_module_settings(cfgfname, "logcolors",
+			read_console_settings, &swcfg);
 
 		int ret = read_module_settings(cfgfname, "processes",
 						read_processes_settings,