summaryrefslogtreecommitdiffstats
path: root/src/shared/efi-loader.c
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2020-06-26 17:25:13 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-06-26 22:34:22 +0200
commit7143b95552f1b4782871919f78aa54f53c007142 (patch)
tree11b3b4529cbe3940b60916d96d28fd3c6265f643 /src/shared/efi-loader.c
parenttree-wide: spellcheck fixes (diff)
downloadsystemd-7143b95552f1b4782871919f78aa54f53c007142.tar.xz
systemd-7143b95552f1b4782871919f78aa54f53c007142.zip
efi: define cache functions inside EFI_ENABLE ifdef
../src/shared/efi-loader.c:738:5: error: redefinition of 'efi_loader_get_config_timeout_one_shot' int efi_loader_get_config_timeout_one_shot(usec_t *ret) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/shared/efi-loader.c:9: ../src/shared/efi-loader.h:85:19: note: previous definition of 'efi_loader_get_config_timeout_one_shot' was here static inline int efi_loader_get_config_timeout_one_shot(usec_t *ret) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../src/shared/efi-loader.c:776:5: error: redefinition of 'efi_loader_update_entry_one_shot_cache' int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from ../src/shared/efi-loader.c:9: ../src/shared/efi-loader.h:89:19: note: previous definition of 'efi_loader_update_entry_one_shot_cache' was here static inline int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat) {
Diffstat (limited to '')
-rw-r--r--src/shared/efi-loader.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c
index 00e572c423..9411fc8cef 100644
--- a/src/shared/efi-loader.c
+++ b/src/shared/efi-loader.c
@@ -713,28 +713,6 @@ int efi_loader_get_features(uint64_t *ret) {
return 0;
}
-#endif
-
-bool efi_loader_entry_name_valid(const char *s) {
- if (isempty(s))
- return false;
-
- if (strlen(s) > FILENAME_MAX) /* Make sure entry names fit in filenames */
- return false;
-
- return in_charset(s, ALPHANUMERICAL "+-_.");
-}
-
-char *efi_tilt_backslashes(char *s) {
- char *p;
-
- for (p = s; *p; p++)
- if (*p == '\\')
- *p = '/';
-
- return s;
-}
-
int efi_loader_get_config_timeout_one_shot(usec_t *ret) {
_cleanup_free_ char *v = NULL, *fn = NULL;
static struct stat cache_stat = {};
@@ -804,3 +782,25 @@ int efi_loader_update_entry_one_shot_cache(char **cache, struct stat *cache_stat
return 0;
}
+
+#endif
+
+bool efi_loader_entry_name_valid(const char *s) {
+ if (isempty(s))
+ return false;
+
+ if (strlen(s) > FILENAME_MAX) /* Make sure entry names fit in filenames */
+ return false;
+
+ return in_charset(s, ALPHANUMERICAL "+-_.");
+}
+
+char *efi_tilt_backslashes(char *s) {
+ char *p;
+
+ for (p = s; *p; p++)
+ if (*p == '\\')
+ *p = '/';
+
+ return s;
+}