summaryrefslogtreecommitdiffstats
path: root/lib/types/types.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-04-08 09:45:43 +1000
committerSamuel Mendoza-Jonas <sam.mj@au1.ibm.com>2015-05-05 15:03:53 +1000
commitb9af039e99527159aad905c3395fa974b9621f8e (patch)
tree7d7289700e60c55bcf9636da8119026ad7cf7cc6 /lib/types/types.c
parent893cfce3e9ea91a68e678829fb8e7e37102e2b41 (diff)
downloadtalos-petitboot-b9af039e99527159aad905c3395fa974b9621f8e.tar.gz
talos-petitboot-b9af039e99527159aad905c3395fa974b9621f8e.zip
lib: Move ipmi_bootdev enum to types.h
Move the ipmi_bootdev definition to types.h to support returning descriptive strings to the system configuration UI. Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Diffstat (limited to 'lib/types/types.c')
-rw-r--r--lib/types/types.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/types/types.c b/lib/types/types.c
index 059e52a..95a3a48 100644
--- a/lib/types/types.c
+++ b/lib/types/types.c
@@ -2,6 +2,26 @@
#include <types/types.h>
#include <i18n/i18n.h>
+const char *ipmi_bootdev_display_name(enum ipmi_bootdev bootdev)
+{
+ switch (bootdev) {
+ case IPMI_BOOTDEV_NONE:
+ return _("None");
+ case IPMI_BOOTDEV_NETWORK:
+ return _("Network");
+ case IPMI_BOOTDEV_DISK:
+ return _("Disk");
+ case IPMI_BOOTDEV_SAFE:
+ return _("Safe Mode");
+ case IPMI_BOOTDEV_CDROM:
+ return _("Optical");
+ case IPMI_BOOTDEV_SETUP:
+ return _("Setup Mode");
+ default:
+ return _("Unknown");
+ }
+}
+
const char *device_type_display_name(enum device_type type)
{
switch (type) {
OpenPOWER on IntegriCloud