From patchwork Fri Jan 22 19:30:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 60199 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp51483lbb; Fri, 22 Jan 2016 11:33:35 -0800 (PST) X-Received: by 10.55.18.36 with SMTP id c36mr5066747qkh.54.1453491198820; Fri, 22 Jan 2016 11:33:18 -0800 (PST) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id d10si8558759qgf.109.2016.01.22.11.33.17 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 22 Jan 2016 11:33:18 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0MJUmts001546; Fri, 22 Jan 2016 14:30:48 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u0MJUk7Y019950 for ; Fri, 22 Jan 2016 14:30:46 -0500 Received: from colepc.redhat.com (ovpn-113-198.phx2.redhat.com [10.3.113.198]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0MJUaPY002518; Fri, 22 Jan 2016 14:30:46 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Fri, 22 Jan 2016 14:30:26 -0500 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/17] qemu: command: drop QEMU_CAPS_DEVICE for watchdog cli X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com 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 --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);