summaryrefslogtreecommitdiff
path: root/src/shared/efi-loader.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/efi-loader.c')
-rw-r--r--src/shared/efi-loader.c34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/shared/efi-loader.c b/src/shared/efi-loader.c
index 108f31d502..b05dc91ecf 100644
--- a/src/shared/efi-loader.c
+++ b/src/shared/efi-loader.c
@@ -63,40 +63,6 @@ struct device_path device_path__contents;
struct device_path__packed device_path__contents _packed_;
assert_cc(sizeof(struct device_path) == sizeof(struct device_path__packed));
-bool is_efi_boot(void) {
- if (detect_container() > 0)
- return false;
-
- return access("/sys/firmware/efi/", F_OK) >= 0;
-}
-
-static int read_flag(const char *varname) {
- _cleanup_free_ void *v = NULL;
- uint8_t b;
- size_t s;
- int r;
-
- if (!is_efi_boot()) /* If this is not an EFI boot, assume the queried flags are zero */
- return 0;
-
- r = efi_get_variable(EFI_VENDOR_GLOBAL, varname, NULL, &v, &s);
- if (r < 0)
- return r;
-
- if (s != 1)
- return -EINVAL;
-
- b = *(uint8_t *)v;
- return !!b;
-}
-
-bool is_efi_secure_boot(void) {
- return read_flag("SecureBoot") > 0;
-}
-
-bool is_efi_secure_boot_setup_mode(void) {
- return read_flag("SetupMode") > 0;
-}
int efi_reboot_to_firmware_supported(void) {
_cleanup_free_ void *v = NULL;