X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=lib%2Ftypes%2Ftypes.c;h=d7f4ead791d2e7e312bdd531f834cbbee65ac67e;hb=70bb4980b19a4ba1d3f92c18df0b03104c4a9b6b;hp=63045e1a29d2a933abd98bb8ed8826f2adea7a9c;hpb=b4d338c2ae40f16091a4bb4a0cc4f2e322f4f4b9;p=petitboot diff --git a/lib/types/types.c b/lib/types/types.c index 63045e1..d7f4ead 100644 --- a/lib/types/types.c +++ b/lib/types/types.c @@ -75,3 +75,15 @@ enum device_type find_device_type(const char *str) return DEVICE_TYPE_UNKNOWN; } + +bool config_autoboot_active(const struct config *config) +{ + enum ipmi_bootdev bootdev = config->ipmi_bootdev; + + if (!config->autoboot_enabled) + return false; + if (bootdev == IPMI_BOOTDEV_SETUP || bootdev == IPMI_BOOTDEV_SAFE) + return false; + + return true; +}