xattr: buffer full check for freebsd
xattr: buffer full check for freebsd

freebsd 10.2:

it does not give rc < 0 and errno == ERANGE if the buffer was too small,
like linux or mac OS X does.

rv == buffer len might be a signal of truncation.
rv > buffer len would be even worse

not sure if some implementation returns the total length of the data,
not just the amount put into the buffer.

but as we use the returned length to "truncate" the buffer, we better
make sure it is not longer than the buffer.

also: freebsd listxattr memoryview len bugfix

raxenak/borg,RonnyPfannschmidt/borg,raxenak/borg,raxenak/borg,edgimar/borg,edgewood/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,edgimar/borg,edgewood/borg,RonnyPfannschmidt/borg,RonnyPfannschmidt/borg,edgewood/borg,raxenak/borg,edgewood/borg,edgimar/borg,edgimar/borg