obmc-console: Consolidate handling of default socket-id
If console-id is not specified on command line or in the config file
then use the default value. ae2460d0b8e8 ("obmc-console: Provide a
default value for `console-id`.") only implemented the default value for
naming the abstract listening socket and overlooked the new DBus path
naming convention. This caused issues during dbus registration:
```
obmc-console-server: Object name: /xyz/openbmc_project/console/(null)
obmc-console-server: Failed to issue method call: Invalid argument
```
Fixes: ae2460d0b8e8 ("obmc-console: Provide a default value for `console-id`.")
Change-Id: I6d0f7b23cc085992189cd4463129a6aae590b3e7
Signed-off-by: Ninad Palsule <ninadpalsule@us.ibm.com>
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
diff --git a/console-server.h b/console-server.h
index bd287c8..5343af8 100644
--- a/console-server.h
+++ b/console-server.h
@@ -209,6 +209,8 @@
struct config;
const char *config_get_value(struct config *config, const char *name);
struct config *config_init(const char *filename);
+const char *config_resolve_console_id(struct config *config,
+ const char *id_arg);
void config_fini(struct config *config);
int config_parse_baud(speed_t *speed, const char *baud_string);