From nobody Sun Feb 8 19:25:13 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1583757096; cv=none; d=zohomail.com; s=zohoarc; b=Meljj+vK9S82n4Yo4+Z+2McbiSJVZa64QvHUMPNxHcSPcb9yhIM264vQlnL6Hf7OXsaDLv27kEGGHmyGIb48GFBaMtlCBp5sFqhA39FRGpcxy9KW0JvaJsxpMf3QyFs3uvc2n/uiA8YmsaUHibhuo1a0voJyp2BDMGJugU7Io0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583757096; 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=fsDgc+zEsu0pZjv8A/rs5U9Xla4b2ml6YciKQutsa5Q=; b=cpf2gxc8jqKhrFc1kE81z6NU4K//1E7KDYlLI0oYUhX105ug8AW+xPY9N7e/5D5n9IHhCuDNi69WVmwZDZ/YjmuoTLwNfYrl3cSsnNYevDQs/DXjG73XUrOn2L+xR5KV/5ifxjcdfWiAyCmWT9N9gwmZqHFbHBp9smRoGd3y49k= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1583757096479518.2755887918272; Mon, 9 Mar 2020 05:31:36 -0700 (PDT) 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-142-TrUy-UnCOpmlyjWKQ7G5kA-1; Mon, 09 Mar 2020 08:31:33 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A56521005509; Mon, 9 Mar 2020 12:31:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D9AA60BFB; Mon, 9 Mar 2020 12:31:26 +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 2717884493; Mon, 9 Mar 2020 12:31:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 029CVLTC011544 for ; Mon, 9 Mar 2020 08:31:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9826E62667; Mon, 9 Mar 2020 12:31:21 +0000 (UTC) Received: from moe.redhat.com (unknown [10.43.2.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1C0515C13D for ; Mon, 9 Mar 2020 12:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583757095; 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=fsDgc+zEsu0pZjv8A/rs5U9Xla4b2ml6YciKQutsa5Q=; b=KTHCEeZdZcMlltZJh1bRb8TpO9NSp2tOgdGHGQDyuEVxHifVuBg3muDQ5g9/7Wa9Sy3dj9 gSMwufeS6PTpW/eQYI8IdtVsqrvtY0IWnJrdG0uzm94jFzz2Eh41Znf8tKGu/AlXKTe5r0 FN9rQBF+7Mn9i8fSOJuWi+7PW2FI8+0= X-MC-Unique: TrUy-UnCOpmlyjWKQ7G5kA-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 1/2] virCgroupV2DevicesAvailable: Print stringified errno in the debug log Date: Mon, 9 Mar 2020 13:31:15 +0100 Message-Id: <6fff97119a6d0363ee6bb12f3651a8a6a7d3ff91.1583757029.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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.12 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" In the virCgroupV2DevicesAvailable() function we try to determine whether CGroups version 2 are available. We do this by opening what we believe is the CGroup mount point and issuing a BPF call. When the call fails, a debug message is printed. However, the BPF call sets errno too. Include it in the debug message to help us with debugging. Signed-off-by: Michal Privoznik --- src/util/vircgroupv2devices.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/vircgroupv2devices.c b/src/util/vircgroupv2devices.c index 445f9c53fc..d62ee12a05 100644 --- a/src/util/vircgroupv2devices.c +++ b/src/util/vircgroupv2devices.c @@ -55,7 +55,7 @@ virCgroupV2DevicesAvailable(virCgroupPtr group) } =20 if (virBPFQueryProg(cgroupfd, 0, BPF_CGROUP_DEVICE, &progCnt, NULL) < = 0) { - VIR_DEBUG("failed to query cgroup progs"); + VIR_DEBUG("failed to query cgroup progs: %s", g_strerror(errno)); return false; } =20 --=20 2.24.1