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 c3a010c094..eacd8c88c2 100644
--- a/bootdevice.c
+++ b/bootdevice.c
@@ -221,10 +221,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);
}