[libvirt] [PATCH 02/10] Add secretObjFromSecret
Eric Blake
eblake at redhat.com
Thu Mar 17 22:53:46 UTC 2016
On 03/02/2016 11:54 AM, John Ferlan wrote:
> Signed-off-by: John Ferlan <jferlan at redhat.com>
> ---
> src/secret/secret_driver.c | 45 +++++++++++++++++++++------------------------
> 1 file changed, 21 insertions(+), 24 deletions(-)
>
> diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
> index b07cc6f..8c1f79a 100644
> --- a/src/secret/secret_driver.c
> +++ b/src/secret/secret_driver.c
> @@ -173,6 +173,23 @@ secretAssignDef(virSecretObjPtr *list,
> return secret;
> }
>
> +
> +static virSecretObjPtr
> +secretObjFromSecret(virSecretPtr secret)
> +{
> + virSecretObjPtr obj;
> + char uuidstr[VIR_UUID_STRING_BUFLEN];
> +
> + if (!(obj = secretFindByUUID(secret->uuid))) {
> + virUUIDFormat(secret->uuid, uuidstr);
> + virReportError(VIR_ERR_NO_SECRET,
> + _("no secret with matching uuid '%s'"), uuidstr);
> + return NULL;
> + }
> + return obj;
> +}
> +
> +
> /* Permament secret storage */
s/Permament/Permanent/ while you are touching this
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160317/f101bd0c/attachment-0001.sig>
More information about the libvir-list
mailing list