+ /*
+ * The buffer for the xattr isn't big enough. the value of
+ * current_xattr->value_length is updated with the actual size
+ * of the xattr. So we free the old buffer and create a new one
+ * and try again.
+ */
+ free(current_xattr->value);
+ current_xattr->value = (char *)malloc(current_xattr->value_length);
+ if (attr_get(jcr->last_fname, attrlist_ent->a_name, current_xattr->value,
+ current_xattr->value_length, xattr_naming_spaces[cnt].flags) != 0) {
+ switch (errno) {
+ case ENOENT:
+ case ENOATTR:
+ retval = bxattr_exit_ok;
+ goto bail_out;
+ default:
+ Mmsg2(jcr->errmsg, _("attr_list error on file \"%s\": ERR=%s\n"),
+ jcr->last_fname, be.bstrerror());
+ Dmsg2(100, "attr_list error file=%s ERR=%s\n",
+ jcr->last_fname, be.bstrerror());
+ goto bail_out;
+ }
+ }