From nobody Mon Feb 9 06:02:07 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1604491326; cv=none; d=zohomail.com; s=zohoarc; b=PzgrvDyHJgM17ioqO0CtgDforJLnoTJzK5fkD/WZxkg950Uxbws+IOlfOcIi5b0Ki1UGayhz/vp6Yw63DrrLaetXxPfK33faxnPlsQlvTcMUNeqKKIeGu9nQpS7FLijLvKFOBCPsDV5Ngh7+2KrK69Sc5sWcIee236XxxVqnTpA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1604491326; 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=slS9uGIdQMeKlfjd4Ko3vqrpJD48IPgw2YZP/IHBvXo=; b=Ay5ksyeGsc3GxchVtgAfarGQct//uLmCyIiuujXZkp0BieI5HyrdJReG6s8J1n3Jcckk1dZA4I/+R8OEbptdO6w8zo/VSDaEpJda7h27PzVw11fBE36/B9TjDW3Km6NTDxR5gJXO78F+Lu5naQEvcEH/SZUBGVwWmAZT7ujShZU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1604491326421783.6373877883682; Wed, 4 Nov 2020 04:02:06 -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-155-x-ZXPPVuNvSJlhWU9eUSBQ-1; Wed, 04 Nov 2020 07:01:37 -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 432F010866BF; Wed, 4 Nov 2020 12:01:32 +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 1FD0F5DA6B; Wed, 4 Nov 2020 12:01:32 +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 D41811832FB8; Wed, 4 Nov 2020 12:01:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0A4C1BjT022233 for ; Wed, 4 Nov 2020 07:01:11 -0500 Received: by smtp.corp.redhat.com (Postfix) id B79AF1E2; Wed, 4 Nov 2020 12:01:11 +0000 (UTC) Received: from lpt.redhat.com (unknown [10.40.208.73]) by smtp.corp.redhat.com (Postfix) with ESMTP id 11AB75C5DE for ; Wed, 4 Nov 2020 12:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1604491323; 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=slS9uGIdQMeKlfjd4Ko3vqrpJD48IPgw2YZP/IHBvXo=; b=cdada577GOxVfP9gp9J2ranl+E4pkyTTGG+Ffsw+OavgnuJ5VOMsItXfnSEACnqgG6+b+H B9b54s6RwKTM4zSGrCT5pRHLxg62hUuW4OZ5f8C43lbS1PlQzu4O3zCgAUEMPz0EUx4Bf0 rgYWEC8PVuau93cyxms0rf1lIgNQxl4= X-MC-Unique: x-ZXPPVuNvSJlhWU9eUSBQ-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 2/2] util: quieten virSCSIHostGetUniqueId Date: Wed, 4 Nov 2020 13:01:01 +0100 Message-Id: <21a63219d4059945b0416ff997e52d5a7f8d88b7.1604491232.git.jtomko@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 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-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) The only caller of this function ignores failure and just sets the unique_id to -1. Failing to read the file is likely to the device no longer being present, not a real error. Stop reporting errors in this function. https://bugzilla.redhat.com/show_bug.cgi?id=3D1692100 Signed-off-by: J=C3=A1n Tomko --- src/util/virscsihost.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/util/virscsihost.c b/src/util/virscsihost.c index 4d314c3ceb..969cdd9f79 100644 --- a/src/util/virscsihost.c +++ b/src/util/virscsihost.c @@ -41,6 +41,8 @@ VIR_LOG_INIT("util.scsi_host"); * Read the value of the "scsi_host" unique_id file. * * Returns the value on success or -1 on failure. + * + * No errors are reported. */ int virSCSIHostGetUniqueId(const char *sysfs_prefix, @@ -54,16 +56,14 @@ virSCSIHostGetUniqueId(const char *sysfs_prefix, sysfs_path =3D g_strdup_printf("%s/host%d/unique_id", sysfs_prefix ? sysfs_prefix : SYSFS_SCSI_= HOST_PATH, host); =20 - if (virFileReadAll(sysfs_path, 1024, &buf) < 0) + if (virFileReadAllQuiet(sysfs_path, 1024, &buf) < 0) return -1; =20 if ((p =3D strchr(buf, '\n'))) *p =3D '\0'; =20 if (virStrToLong_i(buf, NULL, 10, &unique_id) < 0) { - virReportError(VIR_ERR_INTERNAL_ERROR, - _("unable to parse unique_id: %s"), buf); - + VIR_DEBUG("unable to parse unique_id: '%s'", buf); return -1; } =20 --=20 2.26.2