summaryrefslogtreecommitdiffstats
path: root/lib/types/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/types/types.c')
-rw-r--r--lib/types/types.c12
1 files changed, 12 insertions, 0 deletions
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;
+}
OpenPOWER on IntegriCloud