discover: Include leading zero in firmware version string
authorSam Mendoza-Jonas <sam@mendozajonas.com>
Wed, 24 Feb 2016 23:40:59 +0000 (10:40 +1100)
committerSam Mendoza-Jonas <sam@mendozajonas.com>
Thu, 25 Feb 2016 23:26:47 +0000 (10:26 +1100)
Signed-off-by: Sam Mendoza-Jonas <sam@mendozajonas.com>
discover/platform-powerpc.c

index 98deea557b920ab4ae215366fed7398a35ac671c..0e3a10b29d0de2247bb7593fb90844365bad42f1 100644 (file)
@@ -1066,7 +1066,7 @@ static void get_ipmi_bmc_versions(struct platform *p, struct system_info *info)
                bcd += 10 * (resp[4] >> 4);
                memcpy(&aux_version, &resp[12], sizeof(aux_version));
                info->bmc_current[2] = talloc_asprintf(info,
-                                               "Firmware version: %u.%u.%u",
+                                               "Firmware version: %u.%02u.%u",
                                                resp[3], bcd, aux_version);
                bcd = resp[5] & 0x0f;
                bcd += 10 * (resp[5] >> 4);
@@ -1104,7 +1104,7 @@ static void get_ipmi_bmc_versions(struct platform *p, struct system_info *info)
                bcd += 10 * (resp[4] >> 4);
                memcpy(&aux_version, &resp[12], sizeof(aux_version));
                info->bmc_golden[2] = talloc_asprintf(info,
-                                               "Firmware version: %u.%u.%u",
+                                               "Firmware version: %u.%02u.%u",
                                                resp[3], bcd, aux_version);
                bcd = resp[5] & 0x0f;
                bcd += 10 * (resp[5] >> 4);