@@ -51,6 +51,27 @@ void check_boot_index(int32_t bootindex, Error **errp)
}
}
+void del_boot_device_path(DeviceState *dev)
+{
+ FWBootEntry *i;
+
+ assert(dev != NULL);
+
+ /* remove all entries of the assigned device */
+ QTAILQ_FOREACH(i, &fw_boot_order, link) {
+ if (i->dev == NULL) {
+ continue;
+ }
+ if (i->dev == dev) {
+ QTAILQ_REMOVE(&fw_boot_order, i, link);
+ g_free(i->suffix);
+ g_free(i);
+
+ break;
+ }
+ }
+}
+
void add_boot_device_path(int32_t bootindex, DeviceState *dev,
const char *suffix)
{
@@ -214,6 +214,7 @@ char *get_boot_devices_list(size_t *size, bool ignore_suffixes);
DeviceState *get_boot_device(uint32_t position);
void check_boot_index(int32_t bootindex, Error **errp);
+void del_boot_device_path(DeviceState *dev);
QemuOpts *qemu_get_machine_opts(void);