diff options
author | Andreas Gruenbacher <agruen@linbit.com> | 2012-09-14 11:16:49 +0200 |
---|---|---|
committer | Andreas Gruenbacher <agruen@linbit.com> | 2012-09-14 11:39:02 +0200 |
commit | 543906f1a4b15f06ae56e9d735611f3c6559e3dc (patch) | |
tree | e531003d8b3ded66a0e3fefd34db3d703f3e820a /src | |
parent | f0388d2dbff7903e514f86947f3b7c7e29e674c8 (diff) | |
download | patch-543906f1a4b15f06ae56e9d735611f3c6559e3dc.tar.gz |
Check if libattr implements attr_copy_action()
* m4/xattr.m4 (gl_FUNC_XATTR): Check if attr_copy_action() is defined.
* src/util.c: If attr_copy_action() doesn't exist, fall back to the default
copy_attr_file() behavior of copying most extended attributes except ACLs.
Diffstat (limited to 'src')
-rw-r--r-- | src/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -196,6 +196,8 @@ copy_attr_free (struct error_context *ctx, char const *str) { } +#ifdef HAVE_ATTR_COPY_ACTION + static int copy_attr_check (const char *name, struct error_context *ctx) { @@ -203,6 +205,10 @@ copy_attr_check (const char *name, struct error_context *ctx) return action == 0 || action == ATTR_ACTION_PERMISSIONS; } +#else +#define copy_attr_check NULL +#endif + static int copy_attr (char const *src_path, char const *dst_path) { |