Displaying 1 result from an estimated 1 matches for "xattr_list_test".
2007 Nov 15
1
program I used to test xattrs
...s--) {
for (i = 0; i < 100; i++) {
snprintf(name, 80, "security.josef%d\0", i);
ret = setxattr(filelist[files], name, value,
value_size, 0);
if (ret) {
printf("error creating xattr: %d\n", errno);
return ret;
}
}
}
return 0;
}
static int xattr_list_test(int files, char **filelist)
{
char *buffer = NULL;
int buf_size, str_len;
/* since we're just testing listing, we'll just do the list */
while (files--) {
if (listxattr(filelist[files], NULL, 0) < 0) {
printf("error getting xattr list: %d: %s\n", errno, filelist[files...