summaryrefslogtreecommitdiffstats
path: root/lib/pb-config
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2014-12-11 16:38:21 +0800
committerJeremy Kerr <jk@ozlabs.org>2014-12-15 15:47:40 +0800
commitd3e95283e69d3099fe9f36e56be1f645f565c843 (patch)
tree42e2f2c71ede42c9922a327b26340b5909f65b5a /lib/pb-config
parentf69fabee4a120cebaeff2359350e62bd960088f4 (diff)
downloadtalos-petitboot-d3e95283e69d3099fe9f36e56be1f645f565c843.tar.gz
talos-petitboot-d3e95283e69d3099fe9f36e56be1f645f565c843.zip
discover: Integrate ipmi bootdev settings into the priority system
Currently, we expose the boot device priorities through an array in struct config, which will either be the default (network -> disk), or a single device type specified by the IPMI code. Rather than hide the implementation details in this array, we'd like to expose the details of the machine configuration instead. This allows user visibility of the real boot configuration (for example, if an IPMI boot preference is set). This change removes the priority array, and replaces it with the ipmi_bootdev data (and a persistent flag). We update the default-conflict-resolution code to reflect the priorities between IPMI and UUID preferences. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'lib/pb-config')
-rw-r--r--lib/pb-config/pb-config.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/pb-config/pb-config.c b/lib/pb-config/pb-config.c
index fbaa7cb..a2272f4 100644
--- a/lib/pb-config/pb-config.c
+++ b/lib/pb-config/pb-config.c
@@ -74,6 +74,9 @@ struct config *config_copy(void *ctx, const struct config *src)
else
dest->boot_device = NULL;
+ dest->ipmi_bootdev = src->ipmi_bootdev;
+ dest->ipmi_bootdev_persistent = src->ipmi_bootdev_persistent;
+
if (src->lang && strlen(src->lang))
dest->lang = talloc_strdup(dest, src->lang);
else
OpenPOWER on IntegriCloud