summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2019-11-20 12:20:43 +0800
committerJeremy Kerr <jk@ozlabs.org>2020-01-23 09:02:43 +0800
commit6ee9cbcb1bd6ef9fbf1a56322e3fe2fa2646159c (patch)
tree64e28fdf18d41448a421445bae8f08d7c1a6cbeb /lib
parent057dce2dadee2e2fca370d4497c8c792b001c2d3 (diff)
downloadtalos-petitboot-6ee9cbcb1bd6ef9fbf1a56322e3fe2fa2646159c.tar.gz
talos-petitboot-6ee9cbcb1bd6ef9fbf1a56322e3fe2fa2646159c.zip
lib/pb-protocol: fix ordering of system info length calculation
... to match the definition of struct system_info. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/pb-protocol/pb-protocol.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pb-protocol/pb-protocol.c b/lib/pb-protocol/pb-protocol.c
index daf4ec9..e0cef36 100644
--- a/lib/pb-protocol/pb-protocol.c
+++ b/lib/pb-protocol/pb-protocol.c
@@ -253,6 +253,9 @@ int pb_protocol_system_info_len(const struct system_info *sysinfo)
for (i = 0; i < sysinfo->n_bmc_golden; i++)
len += 4 + optional_strlen(sysinfo->bmc_golden[i]);
+ /* BMC MAC */
+ len += HWADDR_SIZE;
+
for (i = 0; i < sysinfo->n_interfaces; i++) {
struct interface_info *if_info = sysinfo->interfaces[i];
len += 4 + if_info->hwaddr_size +
@@ -269,9 +272,6 @@ int pb_protocol_system_info_len(const struct system_info *sysinfo)
4 + optional_strlen(bd_info->mountpoint);
}
- /* BMC MAC */
- len += HWADDR_SIZE;
-
return len;
}
OpenPOWER on IntegriCloud