From: Lennart Poettering Date: Fri, 22 Jun 2018 17:30:12 +0000 (+0200) Subject: bootspec: reduce number of functions we export X-Git-Tag: v240~610^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0de2e1fd2e3eb091aea7e71f8e89b2e6a0d15e77;p=thirdparty%2Fsystemd.git bootspec: reduce number of functions we export Let's internalize these four calls as noone else calls them. --- diff --git a/src/shared/bootspec.c b/src/shared/bootspec.c index 38123faa630..82735833d04 100644 --- a/src/shared/bootspec.c +++ b/src/shared/bootspec.c @@ -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; diff --git a/src/shared/bootspec.h b/src/shared/bootspec.h index c39d773cb34..ed576210fec 100644 --- a/src/shared/bootspec.h +++ b/src/shared/bootspec.h @@ -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);