From nobody Mon Feb 9 05:20:42 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=1611257887; cv=none; d=zohomail.com; s=zohoarc; b=hCcGQSUyrG6KB4GalvWimPdcf+VtwLpcpGOc2/UnoasSnYpk/4uM72O57VGBxDfZL23AH4mGusWEHErBhx+vjxmnWNOi/UjVC2a/TjfTOL9lMgTqqkrXhDLCtE2Rnn5/D6dt09c4dvrgA33sWiEkebmUXLDhWqDANQXcyAoZFtY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1611257887; 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=pZEdEoFftAg72AwAj7w0MMDVos5P6Po4ipO80ioT/rU=; b=MSpIT5MXQUQo0+gi52Bvsm5pKvYA7gHrYeNeeSLJ5i4zpdd75UnsdVyM1q9NRVs9k+QOVxPzCi/LewIgIgkquDLDV6k1JCAM2AfJIE9CeVmK9Gkl8aL7PQE0i7J8yk/5NKQdFGYZeaPLkY87/1DYIN+T0hP5yrB2qq2bGyhqkiU= 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 1611257887838282.71230036536576; Thu, 21 Jan 2021 11:38:07 -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-21-_MFIEsmtNIqcfkvIVbVtEQ-1; Thu, 21 Jan 2021 14:35:03 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 70369184214F; Thu, 21 Jan 2021 19:34:56 +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 4CEEC60C6C; Thu, 21 Jan 2021 19:34:56 +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 DB97F1809CAF; Thu, 21 Jan 2021 19:34:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 10LJYqSk023281 for ; Thu, 21 Jan 2021 14:34:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2F66E10023AE; Thu, 21 Jan 2021 19:34:52 +0000 (UTC) Received: from antique-laptop.redhat.com (unknown [10.40.208.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id C97E3100AE39 for ; Thu, 21 Jan 2021 19:34:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611257886; 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=pZEdEoFftAg72AwAj7w0MMDVos5P6Po4ipO80ioT/rU=; b=R1TRYL0yKg68/7FF1yQKRscrNET+jWKjcmP/raiwWI20ZD5PJiT85Njvv9Mw1L9IgzckRA 3/R0Q+Of4gttd4twOcfv8S+6tXDAM0H+6qjJc+6eXypkh+mfRc3tfmi6Kd9Jwkq77BV/Ob 7XnS8Fm27Q0grJ0MyvWpoRSUpZxcals= X-MC-Unique: _MFIEsmtNIqcfkvIVbVtEQ-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 11/13] util: move virStorageEncryption code into conf Date: Thu, 21 Jan 2021 20:34:25 +0100 Message-Id: <394f88f3a2081b3ad7bff93e74c1467fcf3116bd.1611257578.git.phrdina@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.12 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" The code handles XML bits and internal definition and should be in conf directory. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- po/POTFILES.in | 2 +- src/conf/domain_conf.h | 2 +- src/conf/meson.build | 1 + src/conf/storage_conf.h | 2 +- .../storage_encryption_conf.c} | 4 ++-- .../storage_encryption_conf.h} | 2 +- src/conf/storage_source_conf.h | 2 +- src/libvirt_private.syms | 12 ++++++------ src/util/meson.build | 1 - 9 files changed, 14 insertions(+), 14 deletions(-) rename src/{util/virstorageencryption.c =3D> conf/storage_encryption_conf.= c} (99%) rename src/{util/virstorageencryption.h =3D> conf/storage_encryption_conf.= h} (98%) diff --git a/po/POTFILES.in b/po/POTFILES.in index 00100d7d73..05bbe21462 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -43,6 +43,7 @@ @SRCDIR@src/conf/snapshot_conf.c @SRCDIR@src/conf/storage_adapter_conf.c @SRCDIR@src/conf/storage_conf.c +@SRCDIR@src/conf/storage_encryption_conf.c @SRCDIR@src/conf/storage_source_conf.c @SRCDIR@src/conf/virchrdev.c @SRCDIR@src/conf/virdomainmomentobjlist.c @@ -307,7 +308,6 @@ @SRCDIR@src/util/virscsivhost.c @SRCDIR@src/util/virsecret.c @SRCDIR@src/util/virsocketaddr.c -@SRCDIR@src/util/virstorageencryption.c @SRCDIR@src/util/virstoragefile.c @SRCDIR@src/util/virstring.c @SRCDIR@src/util/virsysinfo.c diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index f5d346ddf0..95ad052891 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -29,7 +29,7 @@ #include "internal.h" #include "virconftypes.h" #include "capabilities.h" -#include "virstorageencryption.h" +#include "storage_encryption_conf.h" #include "cpu_conf.h" #include "virthread.h" #include "virhash.h" diff --git a/src/conf/meson.build b/src/conf/meson.build index 9d4831b815..bd35d87e0a 100644 --- a/src/conf/meson.build +++ b/src/conf/meson.build @@ -54,6 +54,7 @@ storage_conf_sources =3D [ 'storage_adapter_conf.c', 'storage_capabilities.c', 'storage_conf.c', + 'storage_encryption_conf.c', 'storage_source_conf.c', 'virstorageobj.c', ] diff --git a/src/conf/storage_conf.h b/src/conf/storage_conf.h index aeda2891d4..647eb847bf 100644 --- a/src/conf/storage_conf.h +++ b/src/conf/storage_conf.h @@ -22,7 +22,7 @@ #pragma once =20 #include "internal.h" -#include "virstorageencryption.h" +#include "storage_encryption_conf.h" #include "storage_source_conf.h" #include "virbitmap.h" #include "virthread.h" diff --git a/src/util/virstorageencryption.c b/src/conf/storage_encryption_= conf.c similarity index 99% rename from src/util/virstorageencryption.c rename to src/conf/storage_encryption_conf.c index c893f0babe..34ad5dffeb 100644 --- a/src/util/virstorageencryption.c +++ b/src/conf/storage_encryption_conf.c @@ -1,5 +1,5 @@ /* - * virstorageencryption.c: volume encryption information + * storage_encryption_conf.c: volume encryption information * * Copyright (C) 2009-2014 Red Hat, Inc. * @@ -27,7 +27,7 @@ =20 #include "virbuffer.h" #include "viralloc.h" -#include "virstorageencryption.h" +#include "storage_encryption_conf.h" #include "virxml.h" #include "virerror.h" #include "viruuid.h" diff --git a/src/util/virstorageencryption.h b/src/conf/storage_encryption_= conf.h similarity index 98% rename from src/util/virstorageencryption.h rename to src/conf/storage_encryption_conf.h index 352dd373d6..0799421763 100644 --- a/src/util/virstorageencryption.h +++ b/src/conf/storage_encryption_conf.h @@ -1,5 +1,5 @@ /* - * virstorageencryption.h: volume encryption information + * storage_encryption_conf.h: volume encryption information * * Copyright (C) 2009-2011, 2014 Red Hat, Inc. * diff --git a/src/conf/storage_source_conf.h b/src/conf/storage_source_conf.h index 6f39ab4bd0..e66ccdedef 100644 --- a/src/conf/storage_source_conf.h +++ b/src/conf/storage_source_conf.h @@ -21,13 +21,13 @@ =20 #pragma once =20 +#include "storage_encryption_conf.h" #include "virbitmap.h" #include "virenum.h" #include "virobject.h" #include "virpci.h" #include "virseclabel.h" #include "virsecret.h" -#include "virstorageencryption.h" =20 /* Types of disk backends (host resource). Comparable to the public * virStorageVolType, except we have an undetermined state, don't have diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b13d0db209..e8fe8e6c12 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -1047,6 +1047,12 @@ virStorageVolTypeFromString; virStorageVolTypeToString; =20 =20 +# conf/storage_encryption_conf.h +virStorageEncryptionFormat; +virStorageEncryptionFree; +virStorageEncryptionParseNode; + + # conf/storage_event.h virStoragePoolEventLifecycleNew; virStoragePoolEventRefreshNew; @@ -3206,12 +3212,6 @@ virSocketAddrSetIPv6AddrNetOrder; virSocketAddrSetPort; =20 =20 -# util/virstorageencryption.h -virStorageEncryptionFormat; -virStorageEncryptionFree; -virStorageEncryptionParseNode; - - # util/virstoragefile.h virStorageFileCanonicalizePath; virStorageFileGetNPIVKey; diff --git a/src/util/meson.build b/src/util/meson.build index b510f0ebe9..c077c5cc99 100644 --- a/src/util/meson.build +++ b/src/util/meson.build @@ -88,7 +88,6 @@ util_sources =3D [ 'virsecret.c', 'virsocket.c', 'virsocketaddr.c', - 'virstorageencryption.c', 'virstoragefile.c', 'virstring.c', 'virsysinfo.c', --=20 2.29.2