]> git.ozlabs.org Git - petitboot/blob - discover/hostboot.c
discover/status: make boot status calls more consistent
[petitboot] / discover / hostboot.c
1 #include <string.h>
2 #include <stdlib.h>
3 #include <errno.h>
4
5 #include <log/log.h>
6 #include <talloc/talloc.h>
7 #include <flash/flash.h>
8
9 #include "hostboot.h"
10
11 void hostboot_load_versions(struct system_info *info)
12 {
13         int n = 0;
14
15         n = flash_parse_version(info, &info->platform_primary, true);
16         if (n < 0)
17                 pb_log("Failed to read platform versions for current side\n");
18         else
19                 info->n_primary = n;
20
21         n = flash_parse_version(info, &info->platform_other, false);
22         if (n < 0)
23                 pb_log("Failed to read platform versions for other side\n");
24         else
25                 info->n_other = n;
26 }