summaryrefslogtreecommitdiff
path: root/src/shared/efivars.c
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/shared/efivars.c
parente1af7092a8e124eff5f7a668f0f1562c4df4b02f (diff)
util: move is_efiboot() to efivars.c
Diffstat (limited to 'src/shared/efivars.c')
-rw-r--r--src/shared/efivars.c4
1 files changed, 4 insertions, 0 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;