X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=lib%2Ftypes%2Ftypes.h;h=3bb8c9be456a6030028bb7569f4b256fa2066a3e;hp=d73f1618e4631ff04738bfeef253d6a305e4c652;hb=a3e3b66fbcb18174fc54ffd771ef3a38c9f8defd;hpb=9239fd1ec121fc6c6eda49ef5c2dab081a026785 diff --git a/lib/types/types.h b/lib/types/types.h index d73f161..3bb8c9b 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; @@ -64,6 +69,13 @@ struct interface_info { unsigned int hwaddr_size; uint8_t *hwaddr; char *name; + bool link; +}; + +struct blockdev_info { + char *name; + char *uuid; + char *mountpoint; }; struct system_info { @@ -71,6 +83,8 @@ struct system_info { char *identifier; struct interface_info **interfaces; unsigned int n_interfaces; + struct blockdev_info **blockdevs; + unsigned int n_blockdevs; }; #define HWADDR_SIZE 6 @@ -99,16 +113,33 @@ struct network_config { unsigned int n_dns_servers; }; -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; + + struct autoboot_option *autoboot_opts; + unsigned int n_autoboot_opts; + + unsigned int ipmi_bootdev; + bool ipmi_bootdev_persistent; + + char *lang; + + /* not user-settable */ + bool safe_mode; + bool debug; }; #endif /* _TYPES_H */