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

Re: [libvirt] [PATCH v3 1/3] virFile: Add APIs for extended attributes handling



On Mon, Mar 11, 2013 at 05:13:27PM +0100, Michal Privoznik wrote:
> Currently, only three wrappers are being implemented:
> virFileSetAttr for setting attributes
> virFileGetAttr for querying attributes (note we need to call it twice,
> first time to get length of attribute value, second to get actual value)
> virFileRemoveAttr for removing attributes
> ---
> 
> diff to v2:
> -drop multiple check for libattr
> 
>  src/libvirt_private.syms |   3 ++
>  src/util/virfile.c       | 106 +++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/virfile.h       |  12 ++++++
>  3 files changed, 121 insertions(+)
> 
> diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
> index 599b71e..f787a12 100644
> --- a/src/libvirt_private.syms
> +++ b/src/libvirt_private.syms
> @@ -1273,8 +1273,11 @@ virFileClose;
>  virFileDirectFdFlag;
>  virFileFclose;
>  virFileFdopen;
> +virFileGetAttr;
>  virFileLoopDeviceAssociate;
> +virFileRemoveAttr;
>  virFileRewrite;
> +virFileSetAttr;
>  virFileTouch;
>  virFileUpdatePerm;
>  virFileWrapperFdClose;
> diff --git a/src/util/virfile.c b/src/util/virfile.c
> index 4a9fa81..aae7101 100644
> --- a/src/util/virfile.c
> +++ b/src/util/virfile.c
> @@ -37,6 +37,11 @@
>  # include <sys/ioctl.h>
>  #endif
>  
> +#ifdef HAVE_LIBATTR

There is no such conditional - use  WITH_ATTR

> +# include <attr/xattr.h>
> +# include <sys/types.h>
> +#endif
> +
>  #include "vircommand.h"
>  #include "configmake.h"
>  #include "viralloc.h"
> @@ -644,3 +649,104 @@ int virFileLoopDeviceAssociate(const char *file,
>  }
>  
>  #endif /* __linux__ */
> +
> +#ifdef HAVE_LIBATTR

Again use  WITH_ATTR


Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|


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