[PATCH 11/17] qemu: command: drop QEMU_CAPS_DEVICE for watchdog cli

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The -watchdog path will never be triggered.
---
 src/qemu/qemu_command.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index e3c6a51..516f351 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10822,25 +10822,11 @@ qemuBuildCommandLine(virConnectPtr conn,
         virDomainWatchdogDefPtr watchdog = def->watchdog;
         char *optstr;
 
-        if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE)) {
-            virCommandAddArg(cmd, "-device");
-
-            optstr = qemuBuildWatchdogDevStr(def, watchdog, qemuCaps);
-            if (!optstr)
-                goto error;
-        } else {
-            virCommandAddArg(cmd, "-watchdog");
-
-            const char *model = virDomainWatchdogModelTypeToString(watchdog->model);
-            if (!model) {
-                virReportError(VIR_ERR_INTERNAL_ERROR,
-                               "%s", _("missing watchdog model"));
-                goto error;
-            }
+        virCommandAddArg(cmd, "-device");
 
-            if (VIR_STRDUP(optstr, model) < 0)
-                goto error;
-        }
+        optstr = qemuBuildWatchdogDevStr(def, watchdog, qemuCaps);
+        if (!optstr)
+            goto error;
         virCommandAddArg(cmd, optstr);
         VIR_FREE(optstr);
 
-- 
2.5.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]