summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2c98f38)
If getxattr() is passed a buffer size of zero then this is a size query.
Return the size of the attribute without copying it out.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
+ /* If bsize is zero then this is a size query.
+ * Return the size, but don't copy.
+ */
+ if (!bsize)
+ return size;
+
if (size <= bsize) {
memcpy(buf, xb + pos, size);
return size;
if (size <= bsize) {
memcpy(buf, xb + pos, size);
return size;