Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
listxattr() test
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/xattr.h>
main(int ac, char *av[])
{
int eno = 0;
ssize_t rv = 0;
rv = listxattr(av[0], NULL, 0);
if (rv < 0) {
eno = errno;
printf("Error listxattr(): %s\n", strerror(eno));
}
printf("listxattr(\"%s\", NULL, 0) = %d\n", av[0], rv);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.