Created
September 25, 2014 19:31
-
-
Save taraijpn/8f3d92f087d659fb7e00 to your computer and use it in GitHub Desktop.
listxattr() test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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