chiark / gitweb /
bootctl: show "n/a" for empty boot option labels
[elogind.git] / src / boot / boot-efi.c
index faa86805d467f6d2daa8e09f32a023151f11a955..51f12c0c1a53fe287635ef8ffe2dac6387c8e775 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++;
         }