You are not logged in.
Glibc implements the (semi-standard) EA functions: {,l,f}setxattr, {,l,f}getxattr, {,l,f}removexattr, {,l,f}listxattr. the interface of which is accessible via sys/xattr.h.
In core there is an 'attr' package -required by acl and more- that includes the exact same functions, the interface is in attr/xattr.h.
I see that attr includes some more -mostly convenience- functions, but other then that are they the same? when should one prefer one over the other?
thanks.
Offline
@philomath: Use "attr/xattr.h". "sys/xattr.h" likely only declares the straight-forward interfaces to the underlying syscalls.
Offline
That's what I thought first, but look at the (attr) source, it can't go more straight-forward...
most of the other libattr functions are just for compatibility with Irix, (the only exceptions seems to be the attr_copy_* functions).
On Acl-devel they say:
The libattr interfaces predate the glibc interfaces - they were used
when we were originally developing the tools.These days, you should always use the glibc variant.
thanks anyway.
Offline