From nobody Mon Feb 9 05:13:51 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=1642516791; cv=none; d=zohomail.com; s=zohoarc; b=GO3sOcNRrVVOl5/BJ6qA03sr5W0GRX0WQDiq5ppjkmLTLAHi5m4NnQE7AEo2xvQN+Zo2pj8gsZlZ84xTN0Rx783sh34pPBFWanWyQhejwMBthSIOS2Zar0aNzL0jLR07vJHUYBfwDgEu6J4LH/bFahvGdAYoo5n9nQFxgMthaFc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1642516791; 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=dQbLwTVQv161uSsoOt8JMJjGu/0CuMKWn7/cu0vkN+M=; b=IHTTWu3x0TzbzaiSW8wMEegpzfJyejl8V98jSFiN0LuUC4SiIdXid5kYe2lc6K3pllEveWr3/lIiQKooLC337Q1M0k4J6s4ar4MWgxBgHk56unFCr0S6+aW9xjzWuVeeoECbuN8hCl966il88BR7K3vZ1d5kDhwzp1l0/1B+rh8= 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 1642516791081648.7913253416822; Tue, 18 Jan 2022 06:39:51 -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-465-61lDXJe7Nki2Fu71V6IQ-A-1; Tue, 18 Jan 2022 09:39:48 -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 31F4E6D24F; Tue, 18 Jan 2022 14:39:43 +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 13F0C798C4; Tue, 18 Jan 2022 14:39:43 +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 AEA541806D2D; Tue, 18 Jan 2022 14:39:42 +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 20IEbgx4016645 for ; Tue, 18 Jan 2022 09:37:42 -0500 Received: by smtp.corp.redhat.com (Postfix) id C3A952BE7F; Tue, 18 Jan 2022 14:37:42 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4AA852C1AE for ; Tue, 18 Jan 2022 14:37:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1642516790; 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=dQbLwTVQv161uSsoOt8JMJjGu/0CuMKWn7/cu0vkN+M=; b=H/b4WLwsh0nhxn0zLO4msjuT/KAFfn9urJzN4+dEjxOg+hPDhGQDxsPL5lDHH1+idzAjiV a+suLRcQVaBh5RsUIqLujjCKYa51Qftn/gq9H+FtJc4VKGGK9X2qADYKGn7B8mCAKe2LRU +VbN5KOTJNHsXArU8WjKGFgVOaf+IS8= X-MC-Unique: 61lDXJe7Nki2Fu71V6IQ-A-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v5 04/13] virdnsmasq: Drop mtime member from struct _dnsmasqCaps Date: Tue, 18 Jan 2022 15:37:11 +0100 Message-Id: <0a7224a1471e294175a9e1295ba846580f6c54e7.1642516422.git.mprivozn@redhat.com> 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: 1642516792762100001 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 Reviewed-by: Andrea Bolognani --- 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