aboutsummaryrefslogtreecommitdiff
path: root/bootdevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootdevice.c')
-rw-r--r--bootdevice.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/bootdevice.c b/bootdevice.c
index df9ab0e802..673bfef60c 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -223,10 +223,15 @@ char *get_boot_devices_list(size_t *size, bool ignore_suffixes)
}
if (!ignore_suffixes) {
- d = qdev_get_own_fw_dev_path_from_handler(i->dev->parent_bus, i->dev);
- if (d) {
- assert(!i->suffix);
- suffix = d;
+ if (i->dev) {
+ d = qdev_get_own_fw_dev_path_from_handler(i->dev->parent_bus,
+ i->dev);
+ if (d) {
+ assert(!i->suffix);
+ suffix = d;
+ } else {
+ suffix = g_strdup(i->suffix);
+ }
} else {
suffix = g_strdup(i->suffix);
}