chiark / gitweb /
util: move is_efiboot() to efivars.c
[elogind.git] / src / shared / efivars.c
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;