console-server: Respect DBus init failure
Given that the DBus interface is required by other OpenBMC applications,
don't ignore a failure to initialize it.
It's always possible to add a switch down the track to avoid
initializing the DBus interfaces, if desired.
Change-Id: I8aecf1a1cb06d021f374eaf0fd6893ddf3a9cc3c
Co-developed-by: Alexander Hansen <alexander.hansen@9elements.com>
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/console-server.c b/console-server.c
index aec7a35..596e227 100644
--- a/console-server.c
+++ b/console-server.c
@@ -1007,7 +1007,10 @@
goto out_ringbuffer_fini;
}
- dbus_init(console, config);
+ rc = dbus_init(console, config);
+ if (rc) {
+ goto out_tty_fini;
+ }
handlers_init(console, config);
@@ -1015,6 +1018,7 @@
handlers_fini(console);
+out_tty_fini:
tty_fini(console);
out_ringbuffer_fini: