diff mbox

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

Message ID fb3c117169952d3965078e1e9ec0358486c8fcda.1453489952.git.crobinso@redhat.com
State New
Headers show

Commit Message

Cole Robinson Jan. 22, 2016, 7:30 p.m. UTC
The -watchdog path will never be triggered.
---
 src/qemu/qemu_command.c | 22 ++++------------------
 1 file changed, 4 insertions(+), 18 deletions(-)

-- 
2.5.0

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

Patch

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);