From a3e3b66fbcb18174fc54ffd771ef3a38c9f8defd Mon Sep 17 00:00:00 2001 From: Samuel Mendoza-Jonas Date: Wed, 21 Jan 2015 16:12:14 +1100 Subject: petitboot: Implement ordered boot options Move petitboot to a more familiar 'boot-order' based autoboot system. The discover server now reads multiple values from the petitboot,bootdev parameter and adds them in order to config->autoboot_opts. Boot priority is determined by the options' position in the list. On the client, nc-config now recognises the new boot order, and allows the user to add, remove, and reorder the devices in the list. Signed-off-by: Samuel Mendoza-Jonas --- lib/types/types.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'lib/types') diff --git a/lib/types/types.h b/lib/types/types.h index e22dbc3..3bb8c9b 100644 --- a/lib/types/types.h +++ b/lib/types/types.h @@ -113,15 +113,6 @@ struct network_config { unsigned int n_dns_servers; }; -struct boot_priority { - /* Boot options with higher priority values will take precedence over - * lower values. Negative priorities signify "don't boot this by - * default". - */ - int priority; - enum device_type type; -}; - struct autoboot_option { enum { BOOT_DEVICE_TYPE, @@ -138,10 +129,8 @@ struct config { unsigned int autoboot_timeout_sec; struct network_config network; - struct boot_priority *boot_priorities; - unsigned int n_boot_priorities; - - char *boot_device; + struct autoboot_option *autoboot_opts; + unsigned int n_autoboot_opts; unsigned int ipmi_bootdev; bool ipmi_bootdev_persistent; -- cgit v1.1