From nobody Sun Feb 8 17:22:28 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.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=1697468767; cv=none; d=zohomail.com; s=zohoarc; b=UJcN1DckYXT8MnoYJJgJfXV5rdErVga+4LQH+12wKyz+YS93jDeBxMalPw1WFpLL4cFieWl6hU560r2ko80Hn2a540HePArXF6mEq21PDc9V09op87VJUmjNVP059w91hePZ98GIPgennzaN2eZh3XOLegVBW+yXNT+qWqf///4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697468767; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To:Cc; bh=5mEMNv1bXWLkrY0Xuim5SxATT0vFVrtn3suLrC8JYYQ=; b=JDouqiDNh6Uf7pJZXgKjIcYMg07yeIWxpJ/kDhO8V3JClXeMys4NlvzZA01YwSVm2CU0+IRIecjO/V92Gdz8hrPM702hUbrBvz+CaIwQZrEBN5Wgs+czB0yGXXivQBdQfKCSfjrmrGB1hWVFC7lA+P3t/Au3pu9lKYsdeJyKAMQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1697468767395205.56461427240345; Mon, 16 Oct 2023 08:06:07 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-201-0X-nC7HfOqq2uee9bm2W_w-1; Mon, 16 Oct 2023 11:02:44 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 96AED18312CA; Mon, 16 Oct 2023 15:02:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 80DAD1C060AE; Mon, 16 Oct 2023 15:02:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 583B51946588; Mon, 16 Oct 2023 15:02:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C8D98194658D for ; Mon, 16 Oct 2023 15:02:16 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id BB2AB40C6CA3; Mon, 16 Oct 2023 15:02:16 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.10]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4505640C6CA0 for ; Mon, 16 Oct 2023 15:02:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697468766; 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=5mEMNv1bXWLkrY0Xuim5SxATT0vFVrtn3suLrC8JYYQ=; b=Q3iTzuoUDqgXCvi8mC4wDUPVpFxEejwB/UhQt393E5wG4BopgUq446HaKM8bBQctxRJeq0 lbzG6MxUMnxIRkAw/jMynPS/PdzWvdruV/ilQh3/O23cd5zU43MYhIC/TcyrTWNRUSgYp3 y58efGMoTgElfLD83oXgmXRE33lecNw= X-MC-Unique: 0X-nC7HfOqq2uee9bm2W_w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 17/31] qemu: block: Add accessors for storage source effective nodename Date: Mon, 16 Oct 2023 17:01:44 +0200 Message-ID: <57be28cd9385bf2bfbfe5498a73f27cd223c6176.1697468414.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697468769386100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa --- src/qemu/qemu_block.c | 14 ++++++++++++++ src/qemu/qemu_block.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/src/qemu/qemu_block.c b/src/qemu/qemu_block.c index cba1fb1c1e..10c2c0104b 100644 --- a/src/qemu/qemu_block.c +++ b/src/qemu/qemu_block.c @@ -86,6 +86,20 @@ qemuBlockStorageSourceSetFormatNodename(virStorageSource= *src, } +/** + * qemuBlockStorageSourceGetEffectiveNodename: + * @src: virStorageSource to get the effective nodename of + * + * Gets the nodename that exposes the guest visible data. This function al= ways + * returns a name. + */ +const char * +qemuBlockStorageSourceGetEffectiveNodename(virStorageSource *src) +{ + return src->nodeformat; +} + + /** * qemuBlockStorageSourceGetEffectiveStorageNodename: * @src: virStorageSource to get the effective nodename of diff --git a/src/qemu/qemu_block.h b/src/qemu/qemu_block.h index 6ed0aa85b2..7008a4e7da 100644 --- a/src/qemu/qemu_block.h +++ b/src/qemu/qemu_block.h @@ -43,6 +43,9 @@ qemuBlockStorageSourceGetStorageNodename(virStorageSource= *src); const char * qemuBlockStorageSourceGetFormatNodename(virStorageSource *src); +const char * +qemuBlockStorageSourceGetEffectiveNodename(virStorageSource *src); + typedef struct qemuBlockNodeNameBackingChainData qemuBlockNodeNameBackingC= hainData; struct qemuBlockNodeNameBackingChainData { --=20 2.41.0