chiark / gitweb /
core: add new .slice unit type for partitioning systems
[elogind.git] / src / boot / boot-efi.c
index faa86805d467f6d2daa8e09f32a023151f11a955..9960c4d7423a72da9f3556454e4826c47d93e5b3 100644 (file)
@@ -75,7 +75,13 @@ static int get_boot_entries(struct boot_info *info) {
                 err = efi_get_boot_option(list[i], &e->title, &e->part_uuid, &e->path);
                 if (err < 0)
                         continue;
+
+                if (isempty(e->title)) {
+                        free(e->title);
+                        e->title = NULL;
+                }
                 tilt_slashes(e->path);
+
                 e->id = list[i];
                 info->fw_entries_count++;
         }
@@ -152,6 +158,9 @@ int boot_info_query(struct boot_info *info) {
         char buf[64];
         char *loader_active = NULL;
 
+        info->fw_secure_boot = is_efi_secure_boot();
+        info->fw_secure_boot_setup_mode = is_efi_secure_boot_setup_mode();
+
         efi_get_variable_string(EFI_VENDOR_LOADER, "LoaderInfo", &info->loader);
 
         get_boot_entries(info);