From nobody Sun Feb 8 23:26:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1642432899; cv=none; d=zohomail.com; s=zohoarc; b=G+v+5gCR7okuGMFwpkjJTkhLqzISwBqe3INmGPgNMxgG/qaoyTh1hXY1McY+pTy6N1LDerEXErvv5eSHSvcp9HemPYa25mhKRTxHzxtv/1p+lwRQ6k6IcjrTBmDIUHOl2dVgBq2dXjUy8C/1HsrC/LEPGO5AWYfKyb8VIatU8NA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642432899; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=HxANYHt5RzGK3Q86svdVFLm6Uh4Najv5A4M6CUL2luU=; b=JR7mkxLoRptIC730orzmV7tpfYl8/6C0hRL5Au+g4uXqrnuVagDBJcBhtpAZsbMQrD8Dr4Tji8E7V7Tn1qjXtKnwJlFp7kHA+u9TPbqWqSOT4Dpalq4cXBGope+7XFWAkY6rnpX+Hf9BaqCVfsDXNs81Yk5P5V2rncmiWr5jYeU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1642432899351398.61301504095616; Mon, 17 Jan 2022 07:21:39 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-648-NQaTVyn7P-iNHk_q64Ha2g-1; Mon, 17 Jan 2022 10:19:57 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7DFD285EE72; Mon, 17 Jan 2022 15:19:38 +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 9BBC9798C9; Mon, 17 Jan 2022 15:19:37 +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 E53991809CB9; Mon, 17 Jan 2022 15:19:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 20HFJWuC031514 for ; Mon, 17 Jan 2022 10:19:32 -0500 Received: by smtp.corp.redhat.com (Postfix) id B835C2B4C5; Mon, 17 Jan 2022 15:19:32 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 422B026576 for ; Mon, 17 Jan 2022 15:19:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642432898; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=HxANYHt5RzGK3Q86svdVFLm6Uh4Najv5A4M6CUL2luU=; b=NbVlQEIAmjdUKVl/+WyoSAn39fryqjbSxDLbGp1RLvbVzzyJsHQ5YrkZ/+fvq/xki8ewb4 wV5/gnJHfa57JVBFKvUyxeGMmeJZTXOdqau5pDFnoy57HSn0x+M8AdftYCZ7gp7/VzRr+p p4OuoPDd9QIKAImxUBsBWcLh+UjFiXc= X-MC-Unique: NQaTVyn7P-iNHk_q64Ha2g-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v4 04/13] virdnsmasq: Drop mtime member from struct _dnsmasqCaps Date: Mon, 17 Jan 2022 16:19:18 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1642432900488100001 Content-Type: text/plain; charset="utf-8" The _dnsmasqCaps struct has @mtime member which holds the mtime of the dnsmasq binary. The idea was that capabilities don't need to be queried if mtime hasn't changed since the last time. However, the code that would try to query capabilities again was removed and now we are left with code that stores mtime but has no use for it. Remove the member and code that uses it. Signed-off-by: Michal Privoznik --- src/util/virdnsmasq.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/util/virdnsmasq.c b/src/util/virdnsmasq.c index 7fcaadda3f..c3801d622f 100644 --- a/src/util/virdnsmasq.c +++ b/src/util/virdnsmasq.c @@ -577,7 +577,6 @@ struct _dnsmasqCaps { virObject parent; char *binaryPath; bool noRefresh; - time_t mtime; unsigned long version; }; =20 @@ -651,7 +650,6 @@ dnsmasqCapsSetFromBuffer(dnsmasqCaps *caps, const char = *buf) static int dnsmasqCapsRefreshInternal(dnsmasqCaps *caps) { - struct stat sb; g_autoptr(virCommand) vercmd =3D NULL; g_autoptr(virCommand) helpcmd =3D NULL; g_autofree char *help =3D NULL; @@ -661,15 +659,6 @@ dnsmasqCapsRefreshInternal(dnsmasqCaps *caps) if (!caps || caps->noRefresh) return 0; =20 - if (stat(caps->binaryPath, &sb) < 0) { - virReportSystemError(errno, _("Cannot check dnsmasq binary %s"), - caps->binaryPath); - return -1; - } - if (caps->mtime =3D=3D sb.st_mtime) - return 0; - caps->mtime =3D sb.st_mtime; - /* Make sure the binary we are about to try exec'ing exists. * Technically we could catch the exec() failure, but that's * in a sub-process so it's hard to feed back a useful error. --=20 2.34.1