From nobody Sun Feb 8 18:43:44 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=1644832820; cv=none; d=zohomail.com; s=zohoarc; b=TEZVQR7ZHXwpoOmC2q+HTooW9rxREHjrJdQ7xddMoajBeXSZuEUX9bLoOsOIHS3rEvBJqwH+59rI2qai61G8keXBaGfzZgBmzPLs7Y6ckg1HQQaL0oZfQma1AWqcD+RxdyHlVXdJUau3Hm2s4k7tU9/ka0eEZFMEXTILMw3kbOE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644832820; 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=iq5GBJT2DDKDk/rkPuWc/EwLAqwbC+vr1GcybjnY4Xg=; b=CpL3Nr/c8vwBct+X70yZKoY8t4FJIG0M6xHYbyDZ4SIz0/9ITMV35tjEWU64+w2Pt4niYTKUT2dndEuDDf4zn3odvNLKiWb1EieM+ZrR+d2AmyUAyDoGuGZW4rn/1zSGkw5TjlZnOQcOtxkJzChuivWpKNknlbFxNb2G+zJbAYA= 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 1644832820372773.2294461521708; Mon, 14 Feb 2022 02:00:20 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-326-N1D9B1p_NLyKjdDmVNwXqQ-1; Mon, 14 Feb 2022 05:00:09 -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 DE90546862; Mon, 14 Feb 2022 10:00:04 +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 BC33160C35; Mon, 14 Feb 2022 10:00:04 +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 87BDF4A7CB; Mon, 14 Feb 2022 10:00:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21E9xxeA018313 for ; Mon, 14 Feb 2022 04:59:59 -0500 Received: by smtp.corp.redhat.com (Postfix) id C74A35E487; Mon, 14 Feb 2022 09:59:59 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 33C0F55F7E for ; Mon, 14 Feb 2022 09:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644832819; 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=iq5GBJT2DDKDk/rkPuWc/EwLAqwbC+vr1GcybjnY4Xg=; b=P8CPZvPyxeU23F4HoNLUAN8BRZFrrkVkS34je5SqmzV7UUZfhakhb2YH6YBmwlbkZYggDl N3D3nR0wyqYi/Bz1SB4aEEvriRmA5JVYmbzdVgTRjzLPjSIn1TaDtPj7eI9e9J9RIfcfMe 19grpRWj6CjxDyCtjKEENJudcGSUUBM= X-MC-Unique: N1D9B1p_NLyKjdDmVNwXqQ-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/2] qemu: domain: Move and unexport 'qemuDomainStorageIdNew/Reset' Date: Mon, 14 Feb 2022 10:59:52 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 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-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644832821529100005 Content-Type: text/plain; charset="utf-8" They're used only inside qemu_domain.c. Move it before their usage, and unexport them. Signed-off-by: Peter Krempa --- v2: Unexport qemuDomainStorageIdNew too. src/qemu/qemu_domain.c | 54 +++++++++++++++++++++--------------------- src/qemu/qemu_domain.h | 3 --- 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index c764f6296c..d44244f9b8 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -656,6 +656,33 @@ qemuDomainMasterKeyCreate(virDomainObj *vm) } +/** + * qemuDomainStorageIdNew: + * @priv: qemu VM private data object. + * + * Generate a new unique id for a storage object. Useful for node name gen= eration. + */ +static unsigned int +qemuDomainStorageIdNew(qemuDomainObjPrivate *priv) +{ + return ++priv->nodenameindex; +} + + +/** + * qemuDomainStorageIdReset: + * @priv: qemu VM private data object. + * + * Resets the data for the node name generator. The node names need to be = unique + * for a single instance, so can be reset on VM shutdown. + */ +static void +qemuDomainStorageIdReset(qemuDomainObjPrivate *priv) +{ + priv->nodenameindex =3D 0; +} + + static void qemuDomainSecretInfoClear(qemuDomainSecretInfo *secinfo, bool keepAlias) @@ -10889,33 +10916,6 @@ qemuDomainGetManagedPRSocketPath(qemuDomainObjPriv= ate *priv) } -/** - * qemuDomainStorageIdNew: - * @priv: qemu VM private data object. - * - * Generate a new unique id for a storage object. Useful for node name gen= eration. - */ -unsigned int -qemuDomainStorageIdNew(qemuDomainObjPrivate *priv) -{ - return ++priv->nodenameindex; -} - - -/** - * qemuDomainStorageIdReset: - * @priv: qemu VM private data object. - * - * Resets the data for the node name generator. The node names need to be = unique - * for a single instance, so can be reset on VM shutdown. - */ -void -qemuDomainStorageIdReset(qemuDomainObjPrivate *priv) -{ - priv->nodenameindex =3D 0; -} - - virDomainEventResumedDetailType qemuDomainRunningReasonToResumeEvent(virDomainRunningReason reason) { diff --git a/src/qemu/qemu_domain.h b/src/qemu/qemu_domain.h index 8bf1c91049..0a9d312b65 100644 --- a/src/qemu/qemu_domain.h +++ b/src/qemu/qemu_domain.h @@ -969,9 +969,6 @@ char * qemuDomainGetManagedPRSocketPath(qemuDomainObjPr= ivate *priv); bool qemuDomainDefHasManagedPR(virDomainObj *vm); -unsigned int qemuDomainStorageIdNew(qemuDomainObjPrivate *priv); -void qemuDomainStorageIdReset(qemuDomainObjPrivate *priv); - virDomainEventResumedDetailType qemuDomainRunningReasonToResumeEvent(virDomainRunningReason reason); --=20 2.34.1