]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootspec: rename boot_entry_source_to_string() to boot_entry_source_description_to_st...
authorLennart Poettering <lennart@poettering.net>
Mon, 7 Jul 2025 16:25:22 +0000 (18:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 7 Jul 2025 16:25:22 +0000 (18:25 +0200)
Similar to the previous changes, let's make clear this string table
contains *descriptive*, i.e. meaningful human-readable strings.

src/shared/bootspec.c
src/shared/bootspec.h

index 6fdfdb3db918f881fc19c1e0737b9ec075a13302..30d566e529e32d076e6f7463caf5cdaa7dad692e 100644 (file)
@@ -50,12 +50,12 @@ static const char* const boot_entry_type_table[_BOOT_ENTRY_TYPE_MAX] = {
 
 DEFINE_STRING_TABLE_LOOKUP_TO_STRING(boot_entry_type, BootEntryType);
 
-static const char* const boot_entry_source_table[_BOOT_ENTRY_SOURCE_MAX] = {
+static const char* const boot_entry_source_description_table[_BOOT_ENTRY_SOURCE_MAX] = {
         [BOOT_ENTRY_ESP]      = "EFI System Partition",
         [BOOT_ENTRY_XBOOTLDR] = "Extended Boot Loader Partition",
 };
 
-DEFINE_STRING_TABLE_LOOKUP_TO_STRING(boot_entry_source, BootEntrySource);
+DEFINE_STRING_TABLE_LOOKUP_TO_STRING(boot_entry_source_description, BootEntrySource);
 
 static const char* const boot_entry_source_json_table[_BOOT_ENTRY_SOURCE_MAX] = {
         [BOOT_ENTRY_ESP]      = "esp",
@@ -1872,7 +1872,7 @@ int show_boot_entry(
 
                 printf("       source: %s (on the %s)\n",
                        link ?: text ?: e->path,
-                       boot_entry_source_to_string(e->source));
+                       boot_entry_source_description_to_string(e->source));
         }
         if (e->tries_left != UINT_MAX) {
                 printf("        tries: %u left", e->tries_left);
index 1ce7202d992c1037978a22bbd5ed72786f0136c0..bf4ecb33479727cee1c57d7a0eba47e8f24f41b7 100644 (file)
@@ -94,7 +94,7 @@ typedef struct BootConfig {
 const char* boot_entry_type_description_to_string(BootEntryType) _const_;
 const char* boot_entry_type_to_string(BootEntryType) _const_;
 
-const char* boot_entry_source_to_string(BootEntrySource) _const_;
+const char* boot_entry_source_description_to_string(BootEntrySource) _const_;
 const char* boot_entry_source_json_to_string(BootEntrySource) _const_;
 
 BootEntry* boot_config_find_entry(BootConfig *config, const char *id);