summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-01-19 04:41:33 +0100
committerLennart Poettering <lennart@poettering.net>2013-01-21 01:04:16 +0100
commit34e5a31ec5897de8ba1436dad53df99637569d0a (patch)
treeb9cdf255a4af787ac20905f25878cafb5266ec59 /src
parentshutdown: loop - convert to enumerate match (diff)
downloadsystemd-34e5a31ec5897de8ba1436dad53df99637569d0a.tar.xz
systemd-34e5a31ec5897de8ba1436dad53df99637569d0a.zip
util: move is_efiboot() to efivars.c
Diffstat (limited to 'src')
-rw-r--r--src/core/mount-setup.c1
-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
5 files changed, 8 insertions, 6 deletions
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 98614d0c3e..5b32474bbe 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -41,6 +41,7 @@
#include "path-util.h"
#include "missing.h"
#include "virt.h"
+#include "efivars.h"
#ifndef TTY_GID
#define TTY_GID 5
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())