Add more to the error message by printing the filename and error.
Signed-off-by: Kenneth D'souza <kdsouza@redhat.com>
Reviewed-by: Steve French <stfrench@microsoft.com>
free(attrval);
bufsize += BUFSIZE;
goto cifsacl;
- } else
- printf("getxattr error: %d\n", errno);
+ } else {
+ fprintf(stderr, "getxattr failed on %s: %s\n", filename, strerror(errno) );
+ free(attrval);
+ ret = -1;
+ goto out;
+ }
}
parse_sec_desc((struct cifs_ntsd *)attrval, attrlen, raw);