From nobody Fri May 3 12:59:18 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1582547733; cv=none; d=zohomail.com; s=zohoarc; b=GUH2FfnXXQzadOyzgfPYM1OvItbZomiZldbr/lSpXHKIqhH9EsbGO0/YfS/EjnyU5liqJWU/BkAwCVKYkVKI5P9JmbIY76qNrv+S3/yra8gCXiAbvSowQ2KCobhHuAV5jCL4SQDKDwM3ZsPq7xgN6Lq5vXAoG2juDtISQuJDyxg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582547733; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=Q75TJPu+qF1+vzF/5inSA9VIKnNg5Jq0MuArCQWau0o=; b=P17vWtCNcROcDcW2jKNNv+v8QTtvFtsO7uI/9EcGTGCCgjcje4NiPjVxEvhCBnmSyr17T9I5XQHKKUzH1Rka5gt617mUzaZdHpdN5v6n0W1pk491Wl059ijCZfhrrXFLfoZVd57pWImpf3Q2cNpGtsAcSZmmI9F4TMh+CW00ixQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 158254773309636.09419419885512; Mon, 24 Feb 2020 04:35:33 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-363-MnV8NlWFNqmivyHQw3cWAQ-1; Mon, 24 Feb 2020 07:35:29 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92BA3800D53; Mon, 24 Feb 2020 12:35:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B2B0A5C21B; Mon, 24 Feb 2020 12:35:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C195318034E9; Mon, 24 Feb 2020 12:35:16 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01OCYt57013290 for ; Mon, 24 Feb 2020 07:34:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4F4CC1001902; Mon, 24 Feb 2020 12:34:55 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.43.2.81]) by smtp.corp.redhat.com (Postfix) with ESMTP id C8FB81001B2C for ; Mon, 24 Feb 2020 12:34:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582547732; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=Q75TJPu+qF1+vzF/5inSA9VIKnNg5Jq0MuArCQWau0o=; b=Ak3BFKYPLLD4ITT69B1npH/6dMdkzIxja+tL2uPHk6eJ7oapLu5r4q48ywL943LbmZbXXS 3MLi2vIxm3jBr+yF5np+7pKhrJ6JixISYVqj0OfPzHVn+UAhe7OgoqCApETzJNFu/wEsXv x+N87uUXe0pJ13P6RmYvuifxVgsRKMs= X-MC-Unique: MnV8NlWFNqmivyHQw3cWAQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH] qemu: use correct backendType when checking memfd capability Date: Mon, 24 Feb 2020 13:34:51 +0100 Message-Id: <40e95c25eab476e4fbc2923d49a8de6ce7e4f0b4.1582547677.git.jtomko@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The backend name is memory-backend-memfd but we've been checking for memory-backend-memory. Reported by GCC on rawhide: ../../../src/internal.h:75:22: error: 'strcmp' of a string of length 21 and an array of size 21 evaluates to nonzero [-Werror=3Dstring-compare] ../../../src/qemu/qemu_command.c:3525:20: note: in expansion of macro 'STRE= Q' 3525 | } else if (STREQ(backendType, "memory-backend-memory") && | ^~~~~ Signed-off-by: J=C3=A1n Tomko Fixes: 24b74d187cab48a9dc9f409ea78900154c709579 Reviewed-by: Daniel P. Berrang=C3=A9 --- src/qemu/qemu_command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index f69a9e651c..6d5b53d30a 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -3522,7 +3522,7 @@ qemuBuildMemoryBackendProps(virJSONValuePtr *backendP= rops, _("this qemu doesn't support the " "memory-backend-ram object")); return -1; - } else if (STREQ(backendType, "memory-backend-memory") && + } else if (STREQ(backendType, "memory-backend-memfd") && !virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_MEMORY= _MEMFD)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("this qemu doesn't support the " --=20 2.24.1