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