chiark / gitweb /
util: move is_efiboot() to efivars.c
authorLennart Poettering <lennart@poettering.net>
Sat, 19 Jan 2013 03:41:33 +0000 (04:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Mon, 21 Jan 2013 00:04:16 +0000 (01:04 +0100)
src/core/mount-setup.c
src/shared/efivars.c
src/shared/efivars.h
src/shared/util.c
src/shared/util.h

index 98614d0..5b32474 100644 (file)
@@ -41,6 +41,7 @@
 #include "path-util.h"
 #include "missing.h"
 #include "virt.h"
+#include "efivars.h"
 
 #ifndef TTY_GID
 #define TTY_GID 5
index 3bd47b8..784ff36 100644 (file)
 
 #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;
index 7b65c92..120f3c7 100644 (file)
@@ -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);
index 1aaebf0..490399c 100644 (file)
@@ -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;
index d260385..202e15d 100644 (file)
@@ -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())