]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
boot: make LoaderType enum less special 28258/head
authorLennart Poettering <lennart@poettering.net>
Wed, 5 Jul 2023 13:42:30 +0000 (15:42 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Jul 2023 15:54:59 +0000 (17:54 +0200)
Usually (but not always) we use uppercase type naming, and do a typedef
for enums like this. Do so here too.

src/boot/efi/boot.c

index f90f0891a848667d6d91be582e74bb9fc7a720cf..1321658a01d3f9a5da5c0fb17eb15658e4d8d3a3 100644 (file)
@@ -34,14 +34,15 @@ _used_ _section_(".osrel") static const char osrel[] =
         "VERSION=\"" GIT_VERSION "\"\n"
         "NAME=\"systemd-boot " GIT_VERSION "\"\n";
 
-enum loader_type {
+typedef enum LoaderType {
         LOADER_UNDEFINED,
         LOADER_AUTO,
         LOADER_EFI,
         LOADER_LINUX,         /* Boot loader spec type #1 entries */
         LOADER_UNIFIED_LINUX, /* Boot loader spec type #2 entries */
         LOADER_SECURE_BOOT_KEYS,
-};
+        _LOADER_TYPE_MAX,
+} LoaderType;
 
 typedef struct {
         char16_t *id;         /* The unique identifier for this entry (typically the filename of the file defining the entry) */
@@ -51,7 +52,7 @@ typedef struct {
         char16_t *version;    /* The raw (human readable) version string of the entry */
         char16_t *machine_id;
         EFI_HANDLE *device;
-        enum loader_type type;
+        LoaderType type;
         char16_t *loader;
         char16_t *devicetree;
         char16_t *options;