From nobody Sun May 19 02:06:35 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) client-ip=209.132.183.37; envelope-from=libvir-list-bounces@redhat.com; helo=mx5-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.37 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx5-phx2.redhat.com (mx5-phx2.redhat.com [209.132.183.37]) by mx.zohomail.com with SMTPS id 1489002262503187.84900653558816; Wed, 8 Mar 2017 11:44:22 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx5-phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v28JenDY007164; Wed, 8 Mar 2017 14:40:49 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v28JelkH016063 for ; Wed, 8 Mar 2017 14:40:47 -0500 Received: from localhost.localdomain.com (ovpn-117-9.phx2.redhat.com [10.3.117.9]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v28JelUi020200 for ; Wed, 8 Mar 2017 14:40:47 -0500 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 8 Mar 2017 14:40:35 -0500 Message-Id: <20170308194035.11732-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Rename variable 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Rename 'secretUsageType' to 'usageType' since it's superfluous in an API qemu*Secret* Signed-off-by: John Ferlan --- Pushed as trivial - based upon Jirka's review comment from patch 1 of the "Alter TLS/UUID algorithms to be a bit more generic" series. src/qemu/qemu_domain.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index bffb8ac..4d184d3 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -965,7 +965,7 @@ qemuDomainChrSourcePrivateDispose(void *obj) /* qemuDomainSecretPlainSetup: * @conn: Pointer to connection * @secinfo: Pointer to secret info - * @secretUsageType: The virSecretUsageType + * @usageType: The virSecretUsageType * @username: username to use for authentication (may be NULL) * @seclookupdef: Pointer to seclookupdef data * @@ -976,7 +976,7 @@ qemuDomainChrSourcePrivateDispose(void *obj) static int qemuDomainSecretPlainSetup(virConnectPtr conn, qemuDomainSecretInfoPtr secinfo, - virSecretUsageType secretUsageType, + virSecretUsageType usageType, const char *username, virSecretLookupTypeDefPtr seclookupdef) { @@ -984,7 +984,7 @@ qemuDomainSecretPlainSetup(virConnectPtr conn, if (VIR_STRDUP(secinfo->s.plain.username, username) < 0) return -1; =20 - return virSecretGetSecretString(conn, seclookupdef, secretUsageType, + return virSecretGetSecretString(conn, seclookupdef, usageType, &secinfo->s.plain.secret, &secinfo->s.plain.secretlen); } @@ -995,7 +995,7 @@ qemuDomainSecretPlainSetup(virConnectPtr conn, * @priv: pointer to domain private object * @secinfo: Pointer to secret info * @srcalias: Alias of the disk/hostdev used to generate the secret alias - * @secretUsageType: The virSecretUsageType + * @usageType: The virSecretUsageType * @username: username to use for authentication (may be NULL) * @seclookupdef: Pointer to seclookupdef data * @isLuks: True/False for is for luks (alias generation) @@ -1009,7 +1009,7 @@ qemuDomainSecretAESSetup(virConnectPtr conn, qemuDomainObjPrivatePtr priv, qemuDomainSecretInfoPtr secinfo, const char *srcalias, - virSecretUsageType secretUsageType, + virSecretUsageType usageType, const char *username, virSecretLookupTypeDefPtr seclookupdef, bool isLuks) @@ -1038,7 +1038,7 @@ qemuDomainSecretAESSetup(virConnectPtr conn, goto cleanup; =20 /* Grab the unencoded secret */ - if (virSecretGetSecretString(conn, seclookupdef, secretUsageType, + if (virSecretGetSecretString(conn, seclookupdef, usageType, &secret, &secretlen) < 0) goto cleanup; =20 @@ -1072,7 +1072,7 @@ qemuDomainSecretAESSetup(virConnectPtr conn, * @priv: pointer to domain private object * @secinfo: Pointer to secret info * @srcalias: Alias of the disk/hostdev used to generate the secret alias - * @secretUsageType: The virSecretUsageType + * @usageType: The virSecretUsageType * @username: username to use for authentication (may be NULL) * @seclookupdef: Pointer to seclookupdef data * @isLuks: True when is luks (generates different alias) @@ -1089,22 +1089,22 @@ qemuDomainSecretSetup(virConnectPtr conn, qemuDomainObjPrivatePtr priv, qemuDomainSecretInfoPtr secinfo, const char *srcalias, - virSecretUsageType secretUsageType, + virSecretUsageType usageType, const char *username, virSecretLookupTypeDefPtr seclookupdef, bool isLuks) { if (virCryptoHaveCipher(VIR_CRYPTO_CIPHER_AES256CBC) && virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_SECRET) && - (secretUsageType =3D=3D VIR_SECRET_USAGE_TYPE_CEPH || - secretUsageType =3D=3D VIR_SECRET_USAGE_TYPE_VOLUME || - secretUsageType =3D=3D VIR_SECRET_USAGE_TYPE_TLS)) { + (usageType =3D=3D VIR_SECRET_USAGE_TYPE_CEPH || + usageType =3D=3D VIR_SECRET_USAGE_TYPE_VOLUME || + usageType =3D=3D VIR_SECRET_USAGE_TYPE_TLS)) { if (qemuDomainSecretAESSetup(conn, priv, secinfo, srcalias, - secretUsageType, username, + usageType, username, seclookupdef, isLuks) < 0) return -1; } else { - if (qemuDomainSecretPlainSetup(conn, secinfo, secretUsageType, + if (qemuDomainSecretPlainSetup(conn, secinfo, usageType, username, seclookupdef) < 0) return -1; } @@ -1253,14 +1253,14 @@ qemuDomainSecretDiskPrepare(virConnectPtr conn, qemuDomainDiskPrivatePtr diskPriv =3D QEMU_DOMAIN_DISK_PRIVATE(disk); =20 if (qemuDomainSecretDiskCapable(src)) { - virSecretUsageType secretUsageType =3D VIR_SECRET_USAGE_TYPE_ISCSI; + virSecretUsageType usageType =3D VIR_SECRET_USAGE_TYPE_ISCSI; =20 if (src->protocol =3D=3D VIR_STORAGE_NET_PROTOCOL_RBD) - secretUsageType =3D VIR_SECRET_USAGE_TYPE_CEPH; + usageType =3D VIR_SECRET_USAGE_TYPE_CEPH; =20 if (!(diskPriv->secinfo =3D qemuDomainSecretInfoNew(conn, priv, disk->info.alias, - secretUsageType, src->auth->username, + usageType, src->auth->username, &src->auth->seclookupdef, false))) return -1; } --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list