Correctly return ERANGE in getxattr(2)
authorBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 17 Apr 2013 20:07:36 +0000 (13:07 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 24 Apr 2013 19:35:04 +0000 (12:35 -0700)
commitf706421173c571371afff5e2a2ee0784c5e3f95d
tree602b28cbe4bbcbbd04ddff812f20f113ee7b5eba
parent254255f735c4187f00df6d230b80cae508308f31
Correctly return ERANGE in getxattr(2)

According to the getxattr(2) man page the ERANGE errno should be
returned when the size of the value buffer is to small to hold the
result.  Prior to this patch the implementation would just truncate
the value to size bytes.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1408
module/zfs/zpl_xattr.c