Use libglusterfs wrapper to make setxattr portable
BUG: 764655 Change-Id: I332922521bef5684f18d5f7b226cb36d5303ae47 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6982 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
This commit is contained in:
parent
43f71899c4
commit
13f1d250cc
@ -4,10 +4,11 @@
|
||||
#include <string.h>
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <attr/xattr.h>
|
||||
#include <libgen.h>
|
||||
#include <ctype.h>
|
||||
#include <stdlib.h>
|
||||
#include "glusterfs.h"
|
||||
#include "syscall.h"
|
||||
|
||||
#ifndef UUID_CANONICAL_FORM_LEN
|
||||
#define UUID_CANONICAL_FORM_LEN 36
|
||||
@ -86,8 +87,8 @@ main (int argc, char *argv[])
|
||||
|
||||
memcpy (tmp_blob, bname, strlen (bname));
|
||||
|
||||
ret = setxattr (parent_dir, GF_FUSE_AUX_GFID_HEAL, blob, len,
|
||||
0);
|
||||
ret = sys_lsetxattr (parent_dir, GF_FUSE_AUX_GFID_HEAL,
|
||||
blob, len, 0);
|
||||
if (ret < 0) {
|
||||
fprintf (stderr, "setxattr on %s/%s failed (%s)\n",
|
||||
parent_dir, bname, strerror (errno));
|
||||
|
Loading…
x
Reference in New Issue
Block a user