From nobody Mon Feb 9 17:24:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass(p=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1763666062; cv=none; d=zohomail.com; s=zohoarc; b=brrx6M7A57+7FnXo/nfYEF5Irs8hVxOpjRItxcPqrmzZ/IGzdMkhFxj+d3ONEcJFVg5WsMHgh4rotm8iDpYFHUv+dHvzreTyiNeMKcI72Dpah8QRBoGCA69GuXFMBrdujPKcKT3ESP+6AOmNffpPxkVZ33bVIABAYQ9OV8xNCnY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1763666062; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=qZGp8vuRR8VrNmTSQmIzBXvqSkRg69sI4h/KDVaUFuE=; b=UCedo77UmjYpc84/0SGt97syYa/fg8S3cj2AIR/+O/pKR4roIjI5Jo+6GPwrxO5rZ9uF5AlqeAzTccSxjikENl+BAtdOwPwN3N8WR6nzRYcBF2TIEo2UyI2LbFcMrP9bnJjXWrMqfmFwA5EHEoFF943aZf7rmKkHQjPJ4qJ9WYM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=pass header.from= (p=quarantine dis=none) Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1763666062159944.5079976460054; Thu, 20 Nov 2025 11:14:22 -0800 (PST) Received: from list by lists.xenproject.org with outflank-mailman.1167746.1494030 (Exim 4.92) (envelope-from ) id 1vMA6U-0000Pg-7P; Thu, 20 Nov 2025 19:14:02 +0000 Received: by outflank-mailman (output) from mailman id 1167746.1494030; Thu, 20 Nov 2025 19:14:02 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vMA6T-0000My-J5; Thu, 20 Nov 2025 19:14:01 +0000 Received: by outflank-mailman (input) for mailman id 1167746; Thu, 20 Nov 2025 19:14:00 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1vMA6S-0006n7-4J for xen-devel@lists.xenproject.org; Thu, 20 Nov 2025 19:14:00 +0000 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id 107c47c7-c645-11f0-9d18-b5c5bf9af7f9; Thu, 20 Nov 2025 20:13:59 +0100 (CET) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-LvjNWB7rPgenSYGmtZdSaA-1; Thu, 20 Nov 2025 14:13:52 -0500 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B5935195607A; Thu, 20 Nov 2025 19:13:46 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.45.242.18]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id EFDEB1956045; Thu, 20 Nov 2025 19:13:45 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 5BDDA21E66A9; Thu, 20 Nov 2025 20:13:39 +0100 (CET) X-Outflank-Mailman: Message body and most headers restored to incoming version X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 107c47c7-c645-11f0-9d18-b5c5bf9af7f9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1763666038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qZGp8vuRR8VrNmTSQmIzBXvqSkRg69sI4h/KDVaUFuE=; b=R+0i2IIDLC+vLtIZvtgSPKvt0c+tMcA/o40HYpIfFRkdJgeYqC2QGg2XXB22ed1Yx/sROP rwwCmgGbsZK+ZOZHJFtY5Vr9BmE0s4X6KtdgG0+xrovlS0YyEdxfiv2SqEx6j7ONI4tL+d i7hhSbHkGb0kKjRz//+fI3CwgrfkeGA= X-MC-Unique: LvjNWB7rPgenSYGmtZdSaA-1 X-Mimecast-MFC-AGG-ID: LvjNWB7rPgenSYGmtZdSaA_1763666027 From: Markus Armbruster To: qemu-devel@nongnu.org Cc: arei.gonglei@huawei.com, pizhenwei@bytedance.com, alistair.francis@wdc.com, stefanb@linux.vnet.ibm.com, kwolf@redhat.com, hreitz@redhat.com, sw@weilnetz.de, qemu_oss@crudebyte.com, groug@kaod.org, mst@redhat.com, imammedo@redhat.com, anisinha@redhat.com, kraxel@redhat.com, shentey@gmail.com, npiggin@gmail.com, harshpb@linux.ibm.com, sstabellini@kernel.org, anthony@xenproject.org, paul@xen.org, edgar.iglesias@gmail.com, elena.ufimtseva@oracle.com, jag.raman@oracle.com, sgarzare@redhat.com, pbonzini@redhat.com, fam@euphon.net, philmd@linaro.org, alex@shazbot.org, clg@redhat.com, peterx@redhat.com, farosas@suse.de, lizhijian@fujitsu.com, dave@treblig.org, jasowang@redhat.com, samuel.thibault@ens-lyon.org, michael.roth@amd.com, kkostiuk@redhat.com, zhao1.liu@intel.com, mtosatti@redhat.com, rathc@linux.ibm.com, palmer@dabbelt.com, liwei1518@gmail.com, dbarboza@ventanamicro.com, zhiwei_liu@linux.alibaba.com, marcandre.lureau@redhat.com, qemu-block@nongnu.org, qemu-ppc@nongnu.org, xen-devel@lists.xenproject.org, kvm@vger.kernel.org, qemu-riscv@nongnu.org Subject: [PATCH 05/14] hw/scsi: Use error_setg_file_open() for a better error message Date: Thu, 20 Nov 2025 20:13:30 +0100 Message-ID: <20251120191339.756429-6-armbru@redhat.com> In-Reply-To: <20251120191339.756429-1-armbru@redhat.com> References: <20251120191339.756429-1-armbru@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1763666064154018900 Content-Type: text/plain; charset="utf-8" The error message changes from vhost-scsi: open vhost char device failed: REASON to Could not open '/dev/vhost-scsi': REASON I think the exact file name is more useful to know than the file's purpose. We could put back the "vhost-scsi: " prefix with error_prepend(). Not worth the bother. Signed-off-by: Markus Armbruster Reviewed-by: Dr. David Alan Gilbert --- hw/scsi/vhost-scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/scsi/vhost-scsi.c b/hw/scsi/vhost-scsi.c index cdf405b0f8..239138c931 100644 --- a/hw/scsi/vhost-scsi.c +++ b/hw/scsi/vhost-scsi.c @@ -245,8 +245,7 @@ static void vhost_scsi_realize(DeviceState *dev, Error = **errp) } else { vhostfd =3D open("/dev/vhost-scsi", O_RDWR); if (vhostfd < 0) { - error_setg(errp, "vhost-scsi: open vhost char device failed: %= s", - strerror(errno)); + error_setg_file_open(errp, errno, "/dev/vhost-scsi"); return; } } --=20 2.49.0