When queried libflash will return the 'first' flash side (ie. the one
with the lowest TOC address), however we label this the 'Current' side
which is incorrect if the machine has booted from the alternate side.
A future fix will inlcude additional platform logic to determine which
flash side is current; in the interim label the first flash side as
'Primary' instead of 'Current'.
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
- n = flash_parse_version(info, &info->platform_current, true);
+ n = flash_parse_version(info, &info->platform_primary, true);
if (n < 0)
pb_log("Failed to read platform versions for current side\n");
else
if (n < 0)
pb_log("Failed to read platform versions for current side\n");
else
n = flash_parse_version(info, &info->platform_other, false);
if (n < 0)
n = flash_parse_version(info, &info->platform_other, false);
if (n < 0)
- for (i = 0; i < sysinfo->n_current; i++)
- len += 4 + optional_strlen(sysinfo->platform_current[i]);
+ for (i = 0; i < sysinfo->n_primary; i++)
+ len += 4 + optional_strlen(sysinfo->platform_primary[i]);
len += 4;
for (i = 0; i < sysinfo->n_other; i++)
len += 4 + optional_strlen(sysinfo->platform_other[i]);
len += 4;
for (i = 0; i < sysinfo->n_other; i++)
len += 4 + optional_strlen(sysinfo->platform_other[i]);
pos += pb_protocol_serialise_string(pos, sysinfo->type);
pos += pb_protocol_serialise_string(pos, sysinfo->identifier);
pos += pb_protocol_serialise_string(pos, sysinfo->type);
pos += pb_protocol_serialise_string(pos, sysinfo->identifier);
- *(uint32_t *)pos = __cpu_to_be32(sysinfo->n_current);
+ *(uint32_t *)pos = __cpu_to_be32(sysinfo->n_primary);
- for (i = 0; i < sysinfo->n_current; i++)
- pos += pb_protocol_serialise_string(pos, sysinfo->platform_current[i]);
+ for (i = 0; i < sysinfo->n_primary; i++)
+ pos += pb_protocol_serialise_string(pos, sysinfo->platform_primary[i]);
*(uint32_t *)pos = __cpu_to_be32(sysinfo->n_other);
pos += sizeof(uint32_t);
*(uint32_t *)pos = __cpu_to_be32(sysinfo->n_other);
pos += sizeof(uint32_t);
goto out;
/* Platform version strings for openpower platforms */
goto out;
/* Platform version strings for openpower platforms */
- if (read_u32(&pos, &len, &sysinfo->n_current))
+ if (read_u32(&pos, &len, &sysinfo->n_primary))
- sysinfo->platform_current = talloc_array(sysinfo, char *,
- sysinfo->n_current);
- for (i = 0; i < sysinfo->n_current; i++) {
+ sysinfo->platform_primary = talloc_array(sysinfo, char *,
+ sysinfo->n_primary);
+ for (i = 0; i < sysinfo->n_primary; i++) {
if (read_string(sysinfo, &pos, &len, &tmp))
goto out;
if (read_string(sysinfo, &pos, &len, &tmp))
goto out;
- sysinfo->platform_current[i] = talloc_strdup(sysinfo, tmp);
+ sysinfo->platform_primary[i] = talloc_strdup(sysinfo, tmp);
}
if (read_u32(&pos, &len, &sysinfo->n_other))
}
if (read_u32(&pos, &len, &sysinfo->n_other))
struct system_info {
char *type;
char *identifier;
struct system_info {
char *type;
char *identifier;
- char **platform_current;
+ char **platform_primary;
- unsigned int n_current;
+ unsigned int n_primary;
unsigned int n_other;
char **bmc_current;
char **bmc_golden;
unsigned int n_other;
char **bmc_current;
char **bmc_golden;
line("%-12s %s", _("System type:"), sysinfo->type ?: "");
line("%-12s %s", _("System id:"), sysinfo->identifier ?: "");
line("%-12s %s", _("System type:"), sysinfo->type ?: "");
line("%-12s %s", _("System id:"), sysinfo->identifier ?: "");
- if (sysinfo->n_current) {
+ if (sysinfo->n_primary) {
- line("%s", _("Current platform versions:"));
- for (i = 0; i < sysinfo->n_current; i++) {
- line("\t%s", sysinfo->platform_current[i] ?: "");
+ line("%s", _("Primary platform versions:"));
+ for (i = 0; i < sysinfo->n_primary; i++) {
+ line("\t%s", sysinfo->platform_primary[i] ?: "");