Re: [PATCH v1 16/23] lock_manager: Implement remember & recall APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Oct 12, 2015 at 12:26:01 +0200, Michal Privoznik wrote:
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/libvirt_private.syms   |  2 ++
>  src/locking/lock_manager.c | 32 ++++++++++++++++++++++++++++++++
>  src/locking/lock_manager.h |  9 +++++++++
>  3 files changed, 43 insertions(+)
> 

[...]

> diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
> index a002ea8..8fc82c8 100644
> --- a/src/locking/lock_manager.c
> +++ b/src/locking/lock_manager.c
> @@ -397,3 +397,35 @@ int virLockManagerFree(virLockManagerPtr lock)
>  
>      return 0;
>  }
> +
> +int virLockManagerRememberSeclabel(virLockManagerPtr lock,
> +                                   const char *path,
> +                                   const char *model,
> +                                   const char *label)
> +{
> +    VIR_DEBUG("lock=%p path=%s model=%s label=%s",
> +              lock, path, model, label);
> +
> +    if (!lock)
> +        return 0;
> +
> +    CHECK_MANAGER(drvRemember, 0);

Reporting an error but then returning success doesn't seem to be the
right thing to do.

> +
> +    return lock->driver->drvRemember(lock, path, model, label);
> +}
> +
> +int virLockManagerRecallSeclabel(virLockManagerPtr lock,
> +                                 const char *path,
> +                                 const char *model,
> +                                 char **label)
> +{
> +    VIR_DEBUG("lock=%p path=%s model=%s label=%p",
> +              lock, path, model, label);
> +
> +    if (!lock)
> +        return 0;
> +
> +    CHECK_MANAGER(drvRecall, 0);

Same here.

> +
> +    return lock->driver->drvRecall(lock, path, model, label);
> +}

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]