summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/efivars.c4
-rw-r--r--src/shared/efivars.h3
-rw-r--r--src/shared/util.c4
-rw-r--r--src/shared/util.h2
4 files changed, 7 insertions, 6 deletions
diff --git a/src/shared/efivars.c b/src/shared/efivars.c
index 3bd47b8868..784ff364d9 100644
--- a/src/shared/efivars.c
+++ b/src/shared/efivars.c
@@ -28,6 +28,10 @@
#define EFI_VENDOR_LOADER SD_ID128_MAKE(4a,67,b0,82,0a,4c,41,cf,b6,c7,44,0b,29,bb,8c,4f)
+bool is_efiboot(void) {
+ return access("/sys/firmware/efi", F_OK) >= 0;
+}
+
int efi_get_variable(sd_id128_t vendor, const char *name, uint32_t *attribute, void **value, size_t *size) {
_cleanup_close_ int fd = -1;
_cleanup_free_ char *p = NULL;
diff --git a/src/shared/efivars.h b/src/shared/efivars.h
index 7b65c9264e..120f3c7a6a 100644
--- a/src/shared/efivars.h
+++ b/src/shared/efivars.h
@@ -26,5 +26,8 @@
#include "sd-id128.h"
+bool is_efiboot(void);
+
int efi_get_variable(sd_id128_t vendor, const char *name, uint32_t *attribute, void **value, size_t *size);
+
int efi_get_boot_timestamps(const dual_timestamp *n, dual_timestamp *firmware, dual_timestamp *loader);
diff --git a/src/shared/util.c b/src/shared/util.c
index 1aaebf0612..490399c910 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -77,10 +77,6 @@ char **saved_argv = NULL;
static volatile unsigned cached_columns = 0;
static volatile unsigned cached_lines = 0;
-bool is_efiboot(void) {
- return access("/sys/firmware/efi", F_OK) >= 0;
-}
-
size_t page_size(void) {
static __thread size_t pgsz = 0;
long r;
diff --git a/src/shared/util.h b/src/shared/util.h
index d260385991..202e15d481 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -60,8 +60,6 @@ union dirent_storage {
#define ANSI_HIGHLIGHT_YELLOW_ON "\x1B[1;33m"
#define ANSI_HIGHLIGHT_OFF "\x1B[0m"
-bool is_efiboot(void);
-
size_t page_size(void);
#define PAGE_ALIGN(l) ALIGN_TO((l), page_size())