[gnome-boxes] vm-configurator: Catch errors while updating domain devices
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] vm-configurator: Catch errors while updating domain devices
- Date: Tue, 1 Mar 2022 12:54:00 +0000 (UTC)
commit 004914b631c251d1176dbc594b6da3566d1a8036
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Mar 1 13:39:45 2022 +0100
vm-configurator: Catch errors while updating domain devices
src/vm-configurator.vala | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/src/vm-configurator.vala b/src/vm-configurator.vala
index 472b7991..6d817df7 100644
--- a/src/vm-configurator.vala
+++ b/src/vm-configurator.vala
@@ -260,6 +260,14 @@ public static async void update_existing_domain (Domain domain,
warning ("Failed to update CPU config for '%s': %s", domain.name, e.message);
}
+ try {
+ update_domain_devices (domain);
+ } catch (GLib.Error e) {
+ critical ("Failed to update domain devices");
+ }
+ }
+
+ private static void update_domain_devices (Domain domain) throws GLib.Error {
GLib.List<GVirConfig.DomainDevice> devices = null;
DomainInterface iface = null;
bool supports_alternative_boot_device = false;
@@ -346,6 +354,8 @@ else if (device is DomainDisk) {
devices.reverse ();
domain.set_devices (devices);
+
+ debug ("Updating domain devices for %s", domain.name);
}
public static void enable_boot_menu (Domain domain, bool enable) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]