From nobody Mon Feb 9 21:37:38 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1618346422; cv=none; d=zohomail.com; s=zohoarc; b=Sp+pXzNMLAWbe+vp4Soh8DEeqezWaRIwe6v9rmI2MQvwOg5tKe/Cpt+eEZyIDG5hHFcprV/0GX+4mkurWClAVRyjGTJCqeDlXO6Zqg0/0MgsMoNkK+xoYUWkSn7lNlNG9M+QeLgMXP+XZUJXSTP7QaQkWwVsATUk3NLDJRfQDqo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618346422; 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=P/m+pa0n0XtUYrFOhBJXuAn/IZlQcPu9EQ3UkfL6354=; b=ctPIE2YHEg2Sf4/qno36yekknOsQKYrNCh0nTPaOikfFy19X3bukS/rpS4NmM/wTZy1vi9/FLHf6kRobNHXSgY+7MIPnv9ihq/HnF3Tg/cAfroGvKKhAUv+24pvi+wK296a9871rXEjA2WkW9BQZN651dX3Qxz4NLtfANr2y8q4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1618346422098573.9362997550645; Tue, 13 Apr 2021 13:40:22 -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-279-ny09R7oiOVe2LvLG2k-E7A-1; Tue, 13 Apr 2021 16:40:18 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 113F5814256; Tue, 13 Apr 2021 20:40: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 D348819744; Tue, 13 Apr 2021 20:40:11 +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 70C35180B617; Tue, 13 Apr 2021 20:40:11 +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 13DKdr2l011671 for ; Tue, 13 Apr 2021 16:39:53 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9E51F19744; Tue, 13 Apr 2021 20:39:53 +0000 (UTC) Received: from himantopus.redhat.com (ovpn-113-166.phx2.redhat.com [10.3.113.166]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F58B1972B for ; Tue, 13 Apr 2021 20:39:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1618346421; 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=P/m+pa0n0XtUYrFOhBJXuAn/IZlQcPu9EQ3UkfL6354=; b=ZeedO6oLGBOWvBnmx70/Jz/FLUlCtzb9r7K2NsWc5eCXtCuabTGR7KjZbx6uMnN3IjBWf3 yb/iNB3/lCgO9KuKMGHAISsmZAvQhKlXpwX0LZbF89Lipf1HGIkAD+BjIMlEl2M6kdzsZ1 o4BQiIWWVon6BwdOJWCtpQLa5Ybl4EY= X-MC-Unique: ny09R7oiOVe2LvLG2k-E7A-1 From: Jonathon Jongsma To: libvir-list@redhat.com Subject: [libvirt PATCH v2 02/12] nodedev: avoid use of VIR_ERR_NO_* errors internally Date: Tue, 13 Apr 2021 15:39:38 -0500 Message-Id: <20210413203948.71864-3-jjongsma@redhat.com> In-Reply-To: <20210413203948.71864-1-jjongsma@redhat.com> References: <20210413203948.71864-1-jjongsma@redhat.com> 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.84 on 10.5.11.23 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) Content-Type: text/plain; charset="utf-8" These errors are demoted to debug statements[1] since they're only intended to be used as return values for public APIs. This makes it difficult to debug the problem when something goes wrong since no error message is logged. Switch instead to VIR_ERR_INTERNAL_ERROR so that the error is logged as expected. [1] See the implementation of daemonErrorLogFilter() for details: https://gitlab.com/libvirt/libvirt/-/blob/e2f82a3704f680fbb37a733476d870c19= 232c23e/src/remote/remote_daemon.c#L89 Signed-off-by: Jonathon Jongsma Reviewed-by: Erik Skultety Reviewed-by: Laine Stump --- src/node_device/node_device_driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_de= vice_driver.c index 4cf4e4214f..1d1eaa9561 100644 --- a/src/node_device/node_device_driver.c +++ b/src/node_device/node_device_driver.c @@ -709,7 +709,7 @@ nodeDeviceGetMdevctlDefineStartCommand(virNodeDeviceDef= *def, g_autofree char *parent_addr =3D nodeDeviceFindAddressByName(def->pare= nt); =20 if (!parent_addr) { - virReportError(VIR_ERR_NO_NODE_DEVICE, + virReportError(VIR_ERR_INTERNAL_ERROR, _("unable to find parent device '%s'"), def->parent= ); return NULL; } --=20 2.26.3