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 98614d0c3e031f33b654ec052dce29a77d497f64..5b32474bbe14e319f790813347b4c4f69941c24e 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 3bd47b8868d4f93bc445e26e0b30dbb9e8e3b90d..784ff364d9802c621774f256527f205e1c13ce12 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 7b65c9264efb0b7c4e05d5623c950e61ed381ac9..120f3c7a6a59b068ac02b39d593b41b2a440f47e 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 1aaebf0612ea365514a7373ca6220d478d2f95c9..490399c910876d5cfb0188ca22717ee90f06d5e8 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 d2603859911da0411e1c7b17d0f928f9e3225bc8..202e15d481e7d0a7d1d11c7676d4b547e1c573bb 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())