]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bootspec: reduce number of functions we export
authorLennart Poettering <lennart@poettering.net>
Fri, 22 Jun 2018 17:30:12 +0000 (19:30 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 8 Oct 2018 19:40:44 +0000 (21:40 +0200)
Let's internalize these four calls as noone else calls them.

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

index 38123faa630313b17978f7d551b2c9adbe789175..82735833d04844b4a6f1a0af8062fa82749e01ed 100644 (file)
@@ -20,7 +20,7 @@
 #include "strv.h"
 #include "virt.h"
 
-void boot_entry_free(BootEntry *entry) {
+static void boot_entry_free(BootEntry *entry) {
         assert(entry);
 
         free(entry->id);
@@ -37,7 +37,7 @@ void boot_entry_free(BootEntry *entry) {
         free(entry->device_tree);
 }
 
-int boot_entry_load(const char *path, BootEntry *entry) {
+static int boot_entry_load(const char *path, BootEntry *entry) {
         _cleanup_(boot_entry_free) BootEntry tmp = {};
         _cleanup_fclose_ FILE *f = NULL;
         unsigned line = 1;
@@ -144,7 +144,7 @@ void boot_config_free(BootConfig *config) {
         free(config->entries);
 }
 
-int boot_loader_read_conf(const char *path, BootConfig *config) {
+static int boot_loader_read_conf(const char *path, BootConfig *config) {
         _cleanup_fclose_ FILE *f = NULL;
         unsigned line = 1;
         int r;
@@ -211,7 +211,7 @@ static int boot_entry_compare(const BootEntry *a, const BootEntry *b) {
         return str_verscmp(a->id, b->id);
 }
 
-int boot_entries_find(const char *dir, BootEntry **ret_entries, size_t *ret_n_entries) {
+static int boot_entries_find(const char *dir, BootEntry **ret_entries, size_t *ret_n_entries) {
         _cleanup_strv_free_ char **files = NULL;
         char **f;
         int r;
index c39d773cb3402dd4b0b58c89e239d34b1b0470a8..ed576210fec55ff35788afb9a297d9462122320b 100644 (file)
@@ -39,11 +39,6 @@ typedef struct BootConfig {
         ssize_t default_entry;
 } BootConfig;
 
-void boot_entry_free(BootEntry *entry);
-int boot_entry_load(const char *path, BootEntry *entry);
-int boot_entries_find(const char *dir, BootEntry **entries, size_t *n_entries);
-
-int boot_loader_read_conf(const char *path, BootConfig *config);
 void boot_config_free(BootConfig *config);
 int boot_entries_load_config(const char *esp_path, BootConfig *config);