]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootspec: boot_entry_source_to_json_string() to boot_entry_source_to_string() 38106/head
authorLennart Poettering <lennart@poettering.net>
Mon, 7 Jul 2025 16:26:59 +0000 (18:26 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 7 Jul 2025 16:26:59 +0000 (18:26 +0200)
As with the previous changes for BootEntryType, let's also clean up the
naming for BootEntrySource.

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

index 30d566e529e32d076e6f7463caf5cdaa7dad692e..7788d6551630884d85fcad0030491b23cca16a01 100644 (file)
@@ -57,12 +57,12 @@ static const char* const boot_entry_source_description_table[_BOOT_ENTRY_SOURCE_
 
 DEFINE_STRING_TABLE_LOOKUP_TO_STRING(boot_entry_source_description, BootEntrySource);
 
-static const char* const boot_entry_source_json_table[_BOOT_ENTRY_SOURCE_MAX] = {
+static const char* const boot_entry_source_table[_BOOT_ENTRY_SOURCE_MAX] = {
         [BOOT_ENTRY_ESP]      = "esp",
         [BOOT_ENTRY_XBOOTLDR] = "xbootldr",
 };
 
-DEFINE_STRING_TABLE_LOOKUP_TO_STRING(boot_entry_source_json, BootEntrySource);
+DEFINE_STRING_TABLE_LOOKUP_TO_STRING(boot_entry_source, BootEntrySource);
 
 static void boot_entry_addons_done(BootEntryAddons *addons) {
         assert(addons);
@@ -1943,7 +1943,7 @@ int boot_entry_to_json(const BootConfig *c, size_t i, sd_json_variant **ret) {
         r = sd_json_variant_merge_objectbo(
                         &v,
                         SD_JSON_BUILD_PAIR("type", SD_JSON_BUILD_STRING(boot_entry_type_to_string(e->type))),
-                        SD_JSON_BUILD_PAIR("source", SD_JSON_BUILD_STRING(boot_entry_source_json_to_string(e->source))),
+                        SD_JSON_BUILD_PAIR("source", SD_JSON_BUILD_STRING(boot_entry_source_to_string(e->source))),
                         SD_JSON_BUILD_PAIR_CONDITION(!!e->id, "id", SD_JSON_BUILD_STRING(e->id)),
                         SD_JSON_BUILD_PAIR_CONDITION(!!e->path, "path", SD_JSON_BUILD_STRING(e->path)),
                         SD_JSON_BUILD_PAIR_CONDITION(!!e->root, "root", SD_JSON_BUILD_STRING(e->root)),
index bf4ecb33479727cee1c57d7a0eba47e8f24f41b7..dd192b4722864e61eaed1e5080eb6b123c03f7bd 100644 (file)
@@ -95,7 +95,7 @@ const char* boot_entry_type_description_to_string(BootEntryType) _const_;
 const char* boot_entry_type_to_string(BootEntryType) _const_;
 
 const char* boot_entry_source_description_to_string(BootEntrySource) _const_;
-const char* boot_entry_source_json_to_string(BootEntrySource) _const_;
+const char* boot_entry_source_to_string(BootEntrySource) _const_;
 
 BootEntry* boot_config_find_entry(BootConfig *config, const char *id);