+ rc = parse_ipmi_interface_override(config, &resp[i], resp_len - i);
+
+ if (!rc && persistent) {
+ /* Write this new config to NVRAM */
+ update_network_config(platform, config);
+ rc = write_nvram(platform);
+ if (rc)
+ pb_log("platform: Failed to save persistent interface override\n");
+ }
+}
+
+static void get_active_consoles(struct config *config)
+{
+ struct stat sbuf;
+ char *fsp_prop = NULL;
+
+ config->n_consoles = 2;
+ config->consoles = talloc_array(config, char *, config->n_consoles);
+ if (!config->consoles)
+ goto err;
+
+ config->consoles[0] = talloc_asprintf(config->consoles,
+ "/dev/hvc0 [IPMI / Serial]");
+ config->consoles[1] = talloc_asprintf(config->consoles,
+ "/dev/tty1 [VGA]");
+
+ fsp_prop = talloc_asprintf(config, "%sfsps", devtree_dir);
+ if (stat(fsp_prop, &sbuf) == 0) {
+ /* FSP based machines also have a separate serial console */
+ config->consoles = talloc_realloc(config, config->consoles,
+ char *, config->n_consoles + 1);
+ if (!config->consoles)
+ goto err;
+ config->consoles[config->n_consoles++] = talloc_asprintf(
+ config->consoles,
+ "/dev/hvc1 [Serial]");
+ }
+
+ return;
+err:
+ config->n_consoles = 0;
+ pb_log("Failed to allocate memory for consoles\n");