From nobody Mon Feb 9 14:14:58 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1579779861; cv=none; d=zohomail.com; s=zohoarc; b=ggOE2t3KStkaxFYQn4/pWTK2ZhN0Gg4l5LeWFf2PvAyCzgTnhQcLBJZt0yNS0Wq8pvsaycK1VE1ZqQv/fmCycm8qRCqvPluEiE8ibL/Sqmetp9/l0FSU2Q2yTUSFND1s3XRFctIgANsG6QC4QB1PL2TSXwclDZxStSZk5BM2hs4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579779861; 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=YWdTtGPPFABvfg7wx1wsGjOKCM9qzMmzZuPse/cpjMc=; b=IuR/QuZArvBRiB+RSIM5pCWFO5l4sbqpYc+Lbeei28f/mTRl/5BVHnvU1tKliF3Tfj+vkCdSqgvevdcbvE8gVKYEvkfnewOQnuz/gXcmAAfd+YylyEXAGSp8nYXGc8NMUvrtk9luu4h8y2/kP3p2e/OO0QkGVVcGbFLITLC99ks= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1579779861886328.95502123680103; Thu, 23 Jan 2020 03:44:21 -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-349-VE28T2uQP3ugMaeSd-RZ_w-1; Thu, 23 Jan 2020 06:44:18 -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 DCBCADB60; Thu, 23 Jan 2020 11:44:12 +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 B7AB95C541; Thu, 23 Jan 2020 11:44:12 +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 60E0618034EB; Thu, 23 Jan 2020 11:44:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00NBi97h025530 for ; Thu, 23 Jan 2020 06:44:09 -0500 Received: by smtp.corp.redhat.com (Postfix) id 68B941CB; Thu, 23 Jan 2020 11:44:09 +0000 (UTC) Received: from domokun.gsslab.fab.redhat.com (unknown [10.33.8.110]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9A6885785; Thu, 23 Jan 2020 11:44:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579779860; 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=YWdTtGPPFABvfg7wx1wsGjOKCM9qzMmzZuPse/cpjMc=; b=T5VOIqyTp1NuswXsHQfUUBhknl1oEXbjL3apdCl68ODiGiLo8XEF0LwR2uJDPcl4bySElU wFddhWHu2KbnsRkPgWtAyg9696ZJPcUHsUqZXuA/B6lbzjxo2LG9L2NgauyusYJC0s4gg7 bMaVrmtcwjbHOC+WqfhVTEk6QBVgNMA= From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: libvir-list@redhat.com Subject: [libvirt PATCH 23/32] src: stop using O_DIRECTORY in resctrl Date: Thu, 23 Jan 2020 11:43:16 +0000 Message-Id: <20200123114325.3860881-24-berrange@redhat.com> In-Reply-To: <20200123114325.3860881-1-berrange@redhat.com> References: <20200123114325.3860881-1-berrange@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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-MC-Unique: VE28T2uQP3ugMaeSd-RZ_w-1 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 O_DIRECTORY flag causes open() to return an error if the filename is a directory. There's no obvious reason why resctrl needs to use this, while the rest of libvirt code does not. Removing it avoids build issues on platforms where O_DIRECTORY is not defined, once we remove GNULIB. Signed-off-by: Daniel P. Berrang=C3=A9 --- src/util/virresctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 684d2ce398..e9bcdb44b1 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -455,7 +455,7 @@ VIR_ONCE_GLOBAL_INIT(virResctrl); static int virResctrlLockWrite(void) { - int fd =3D open(SYSFS_RESCTRL_PATH, O_DIRECTORY | O_CLOEXEC); + int fd =3D open(SYSFS_RESCTRL_PATH, O_RDWR | O_CLOEXEC); =20 if (fd < 0) { virReportSystemError(errno, "%s", _("Cannot open resctrl")); --=20 2.24.1