X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Fefivars.c;h=784ff364d9802c621774f256527f205e1c13ce12;hp=3bd47b8868d4f93bc445e26e0b30dbb9e8e3b90d;hb=34e5a31ec5897de8ba1436dad53df99637569d0a;hpb=e1af7092a8e124eff5f7a668f0f1562c4df4b02f diff --git a/src/shared/efivars.c b/src/shared/efivars.c index 3bd47b886..784ff364d 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;