X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=lib%2Ftypes%2Ftypes.h;h=e22dbc307d478389047ad32de52076c57ad955b7;hb=6bb1301835dbd6ff54e1becb5b684fedb0e4caaf;hp=a1065eee62e24efe974dde1eaae11e0ba0dc5658;hpb=aa530148044a7c6d7ec7b6a32672cc69d53979b2;p=petitboot diff --git a/lib/types/types.h b/lib/types/types.h index a1065ee..e22dbc3 100644 --- a/lib/types/types.h +++ b/lib/types/types.h @@ -9,9 +9,14 @@ enum device_type { DEVICE_TYPE_NETWORK, DEVICE_TYPE_DISK, DEVICE_TYPE_OPTICAL, + DEVICE_TYPE_ANY, DEVICE_TYPE_UNKNOWN, }; +const char *device_type_display_name(enum device_type type); +const char *device_type_name(enum device_type type); +enum device_type find_device_type(const char *str); + struct device { char *id; enum device_type type; @@ -117,12 +122,35 @@ struct boot_priority { enum device_type type; }; +struct autoboot_option { + enum { + BOOT_DEVICE_TYPE, + BOOT_DEVICE_UUID + } boot_type; + union { + enum device_type type; + char *uuid; + }; +}; + struct config { bool autoboot_enabled; unsigned int autoboot_timeout_sec; struct network_config network; + struct boot_priority *boot_priorities; unsigned int n_boot_priorities; + + char *boot_device; + + unsigned int ipmi_bootdev; + bool ipmi_bootdev_persistent; + + char *lang; + + /* not user-settable */ + bool safe_mode; + bool debug; }; #endif /* _TYPES_H */