[libvirt] [PATCH 1/4] Fix UUID handling in secrets/storage encryption APIs

Miloslav Trmac mitr at redhat.com
Sat Sep 12 00:28:59 UTC 2009


----- "Daniel P. Berrange" <berrange at redhat.com> wrote:
> @@ -635,49 +620,25 @@ secretLookupByUUIDString(virConnectPtr conn,
> const char *uuid)
>  
>      pptr = secretFind(driver, uuid);
>      if (pptr == NULL) {
> +        char uuidstr[VIR_UUID_STRING_BUFLEN];
> +        virUUIDFormat(uuid, uuidstr);
>          virSecretReportError(conn, VIR_ERR_NO_SECRET,
> -                             _("no secret with matching id '%s'"), uuid);
> +                             _("no secret with matching uuid '%s'"), uuidstr);
>          goto cleanup;
>      }
>  
> -    ret = virGetSecret(conn, (*pptr)->def->id);
> +    ret = virGetSecret(conn, (*pptr)->def->uuid);
>  
>  cleanup:
> +    if (1) {
> +        char uuidstr[VIR_UUID_STRING_BUFLEN];
> +        virUUIDFormat(uuid, uuidstr);
> +        VIR_ERROR("Lookup %s got %p", uuidstr, ret);
> +    }
This looks like a debug print that should be removed in the final version.
    Mirek




More information about the libvir-list mailing list